diff --git a/.devcontainer/compose.yml b/.devcontainer/compose.yml index 7c940656e016..8ee458f126ca 100644 --- a/.devcontainer/compose.yml +++ b/.devcontainer/compose.yml @@ -50,9 +50,9 @@ services: image: getmeili/meilisearch:latest environment: - MEILI_NO_ANALYTICS=true - - MEILI_ENV=production + - MEILI_ENV=development env_file: - - .config/meilisearch.env + - ./meilisearch.env networks: - internal_network volumes: @@ -63,9 +63,9 @@ services: image: getmeili/meilisearch:latest environment: - MEILI_NO_ANALYTICS=true - - MEILI_ENV=production + - MEILI_ENV=development env_file: - - .config/hanamisearch.env + - ./hanamisearch.env networks: - internal_network volumes: diff --git a/.devcontainer/devcontainer.yml b/.devcontainer/devcontainer.yml index 1e5b30087ac1..cd64668043db 100644 --- a/.devcontainer/devcontainer.yml +++ b/.devcontainer/devcontainer.yml @@ -114,22 +114,26 @@ redis: # ┌───────────────────────────┐ #───┘ MeiliSearch configuration └───────────────────────────── +# This API key is dummy. Please replace it with your own. meilisearch: host: meilisearch port: 7700 - apiKey: '' + apiKey: 'hanamisskeyhanamisskeyhanamisskeyhanamisskeyhanamisskeyhanamisskeyhanamisskeyhanamisskeyhanamisskey' ssl: false - index: '' + index: 'meili' + scope: global # ┌────────────────────────────┐ #───┘ HanamiSearch configuration └───────────────────────────── +# This API key is dummy. Please replace it with your own. hanamisearch: host: hanamisearch port: 7700 - apiKey: '' + apiKey: 'hanamisskeyhanamisskeyhanamisskeyhanamisskeyhanamisskeyhanamisskeyhanamisskeyhanamisskeyhanamisskey' ssl: false - index: '' + index: 'hanami' + scope: global # ┌───────────────┐ #───┘ ID generation └─────────────────────────────────────────── diff --git a/.devcontainer/hanamisearch.env b/.devcontainer/hanamisearch.env new file mode 100644 index 000000000000..878c7fd64144 --- /dev/null +++ b/.devcontainer/hanamisearch.env @@ -0,0 +1 @@ +MEILI_MASTER_KEY="hanamisskeyhanamisskeyhanamisskeyhanamisskeyhanamisskeyhanamisskeyhanamisskeyhanamisskeyhanamisskey" diff --git a/.devcontainer/meilisearch.env b/.devcontainer/meilisearch.env new file mode 100644 index 000000000000..878c7fd64144 --- /dev/null +++ b/.devcontainer/meilisearch.env @@ -0,0 +1 @@ +MEILI_MASTER_KEY="hanamisskeyhanamisskeyhanamisskeyhanamisskeyhanamisskeyhanamisskeyhanamisskeyhanamisskeyhanamisskey" diff --git a/.gitignore b/.gitignore index ac7502f384f8..a455497193f9 100644 --- a/.gitignore +++ b/.gitignore @@ -80,3 +80,5 @@ vite.config.local-dev.ts.timestamp-* # VSCode addon .favorites.json +/.devcontainer/hanami_data +/.devcontainer/meili_data diff --git a/packages/backend/src/core/SearchService.ts b/packages/backend/src/core/SearchService.ts index 0d6d1a995be8..4c9d677abccd 100644 --- a/packages/backend/src/core/SearchService.ts +++ b/packages/backend/src/core/SearchService.ts @@ -144,10 +144,7 @@ export class SearchService { const shouldIndex = (scope: string | string[], userHost: string | null): boolean => { if (scope === 'global') return true; - if (scope === 'local') return userHost != null; - if (Array.isArray(scope)) { - return userHost != null && scope.includes(userHost); - } + if (scope === 'local') return userHost === null; return false; };