opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
9.76k stars 1.82k forks source link

[Search] [Star Tree] Option/Param to Disable search via star-tree #14872

Closed sandeshkr419 closed 2 months ago

sandeshkr419 commented 3 months ago

This issue is a follow-up on https://github.com/opensearch-project/OpenSearch/issues/14871

This change concerns indices that support star-tree, and the query/aggregation can be resolved via star-tree. The default search implementation should always use the star-tree if possible for faster query/aggregation support. However, a user should have capability to search via previous non-startree implementation.

One way could be to pass a parameter in search request itself like disable_startree_search: true in search request to skip star-tree execution of a request.

In that way a user can utilize the old code flow without having to get rid of the star-tree from their index or making any changes to the index. In this way, any potential bugs in star-tree index will not affect the user from performing their desired operation with no extra effort.

Alternative is to have cluster level setting, but that takes away the granularity. Or we can have both in place.

mgodwan commented 3 months ago
  1. What are the use-cases where we may want to allow users to choose this?
  2. In case of handling issues like regression, it should be a cluster level setting instead (but even that should be a decision OpenSearch takes by doing a cost estimation for running the query).
sandeshkr419 commented 2 months ago

Discussed the above in Search triage meetup. The was a consensus on not having this param at the request level in sync with @mgodwan comments. Closing this issue for now.