Index-Scoped Configuration for Partial Search #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces an index-based configurable setting for partial search results in Elasticsearch. The primary objective is to enable a boolean variable (
isPartialSearchAllowed) at the index level, which dictates whether partial search results are allowed for queries involving multiple indices.Key Changes
1. New Index Metadata Field
partial_search_allowedto the index metadata. This field is dynamically set based on a cluster-wide setting and can be updated independently for each index.2. Index Setting Update
indices.partial_search.total.use_index_based_setting, to control the index-based partial search behavior.false3. Modified Partial Search Result Limit
action.search.modified_partial_search_result_limit""(empty string)XyrXmoXdaXhrXmiXse(years, months, days, hours, minutes, seconds)4. Index Metadata Builders
IndexMetadata.Builder) to construct and update index metadata with thepartial_search_allowedfield.partial_search_allowedsetting.5. Python Automation Script
AutomatedIndexUpdateScript.py) that periodically checks indices based on their creation date.partial_search_allowedtotrue, utilizing Elasticsearch's Python client (elasticsearch-py).6. Integration with Search Request Handling
TransportSearchAction.java) to evaluate thepartial_search_allowedflag for each index involved in a search request.partial_search_allowedflags across indices in the search request.Configuration for Index-Based Partial Search Setting
To configure the
index.partial_search_allowedsetting for a specific index, use the following configuration in Kibana or through the Elasticsearch API:Enable Partial Search for a Specific Index
Replace
{index_name}with the name of your index.Setting the Age Configuration Limit