Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-03-13 21:08:56 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-03-13 21:08:56 +0300
commit7b7bc31c5ba07eebe62e2f2582f111ce24285cd4 (patch)
tree70c795a932a603e49176d30ee5f0835fcfed46c2 /doc/development/advanced_search.md
parentcb38c5062c623059d311c4e9e37428eacdea95d6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/advanced_search.md')
-rw-r--r--doc/development/advanced_search.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/development/advanced_search.md b/doc/development/advanced_search.md
index 4e61098b17d..4c779088d01 100644
--- a/doc/development/advanced_search.md
+++ b/doc/development/advanced_search.md
@@ -42,6 +42,16 @@ After initial indexing is complete, create, update, and delete operations for al
Search queries are generated by the concerns found in [`ee/app/models/concerns/elastic`](https://gitlab.com/gitlab-org/gitlab/-/tree/master/ee/app/models/concerns/elastic). These concerns are also in charge of access control, and have been a historic source of security bugs so please pay close attention to them!
+### Custom routing
+
+[Custom routing](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-routing-field.html#_searching_with_custom_routing)
+is used in Elasticsearch for document types that are associated with a project. The routing format is `project_<project_id>`. Routing is set
+during indexing and searching operations. Some of the benefits and tradeoffs to using custom routing are:
+
+- Project scoped searches are much faster.
+- Routing is not used if too many shards would be hit for global and group scoped searches.
+- Shard size imbalance might occur.
+
## Existing Analyzers/Tokenizers/Filters
These are all defined in [`ee/lib/elastic/latest/config.rb`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/lib/elastic/latest/config.rb)