-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Keyword search] Globally unique id as elasticsearch index (#9558)
* [Keyword search] Globally unique id as elasticsearch index Description --- Node id is not globally unique, since if e.g. the same notion is plugged on two workspaces, the same page will have the same node id in both workspaces Fixes #9527 Risks --- none, index is not used yet and we'll backfill ES from scratch when all data source folders are already backfilled too Deploy --- core * updated delete methods * better separator * use ds internal id * fix * refactor * correct column name * add ds internal id to mapping
- Loading branch information
1 parent
3bc927e
commit 7a06a48
Showing
10 changed files
with
214 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
core/src/search_stores/indices/data_sources_nodes_2.mappings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"dynamic": "strict", | ||
"properties": { | ||
"data_source_id": { | ||
"type": "keyword" | ||
}, | ||
"data_source_internal_id": { | ||
"type": "keyword" | ||
}, | ||
"timestamp": { | ||
"type": "date" | ||
}, | ||
"node_type": { | ||
"type": "keyword" | ||
}, | ||
"node_id": { | ||
"type": "keyword" | ||
}, | ||
"title": { | ||
"type": "text", | ||
"analyzer": "standard", | ||
"fields": { | ||
"edge": { | ||
"type": "text", | ||
"analyzer": "edge_analyzer" | ||
} | ||
} | ||
}, | ||
"parents": { | ||
"type": "keyword" | ||
}, | ||
"parent_id": { | ||
"type": "keyword" | ||
}, | ||
"mime_type": { | ||
"type": "keyword" | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
core/src/search_stores/indices/data_sources_nodes_2.settings.local.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"number_of_shards": 1, | ||
"number_of_replicas": 0, | ||
"refresh_interval": "30s", | ||
"analysis": { | ||
"analyzer": { | ||
"icu_analyzer": { | ||
"type": "custom", | ||
"tokenizer": "icu_tokenizer", | ||
"filter": [ | ||
"icu_folding", | ||
"lowercase", | ||
"asciifolding", | ||
"preserve_word_delimiter" | ||
] | ||
}, | ||
"edge_analyzer": { | ||
"type": "custom", | ||
"tokenizer": "icu_tokenizer", | ||
"filter": ["lowercase", "edge_ngram_filter"] | ||
} | ||
}, | ||
"filter": { | ||
"preserve_word_delimiter": { | ||
"type": "word_delimiter", | ||
"split_on_numerics": false, | ||
"split_on_case_change": false | ||
}, | ||
"edge_ngram_filter": { | ||
"type": "edge_ngram", | ||
"min_gram": 2, | ||
"max_gram": 20 | ||
} | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
core/src/search_stores/indices/data_sources_nodes_2.settings.us-central-1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"number_of_shards": 2, | ||
"number_of_replicas": 1, | ||
"refresh_interval": "30s", | ||
"analysis": { | ||
"analyzer": { | ||
"icu_analyzer": { | ||
"type": "custom", | ||
"tokenizer": "icu_tokenizer", | ||
"filter": [ | ||
"icu_folding", | ||
"lowercase", | ||
"asciifolding", | ||
"preserve_word_delimiter" | ||
] | ||
}, | ||
"edge_analyzer": { | ||
"type": "custom", | ||
"tokenizer": "icu_tokenizer", | ||
"filter": ["lowercase", "edge_ngram_filter"] | ||
} | ||
}, | ||
"filter": { | ||
"preserve_word_delimiter": { | ||
"type": "word_delimiter", | ||
"split_on_numerics": false, | ||
"split_on_case_change": false | ||
}, | ||
"edge_ngram_filter": { | ||
"type": "edge_ngram", | ||
"min_gram": 2, | ||
"max_gram": 20 | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.