opensearch-project / OpenSearch

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

Temporary Search Pipeline for a Request Not Working as Expected #11030

Closed kirubasankars closed 10 months ago

kirubasankars commented 10 months ago

Description: The temporary search pipeline for a request feature in OpenSearch is not functioning as expected. When executing a search query with a temporary pipeline intended to filter the results, the pipeline does not seem to influence the search results.

https://opensearch.org/docs/latest/search-plugins/search-pipelines/using-search-pipeline/#using-a-temporary-search-pipeline-for-a-request

To Reproduce Steps to reproduce the behavior:

  1. Send a POST request to 'https://0.0.0.0:9200/idx/_search' with appropriate headers including 'Content-Type' set to 'application/json' and 'Authorization'.
  2. In the body of the request, include a 'query' field to perform a text match on a specific field.
  3. Also in the body, include a 'pipeline' field with a 'request_processors' array containing a 'filter_query'.
  4. Observe that the results are not filtered as expected based on the 'filter_query' provided in the 'pipeline'.

Expected behavior The search results should be filtered according to the criteria specified in the 'filter_query' inside the 'pipeline'. Only documents matching both the initial query and the filter query should be returned.

Plugins Please list all plugins currently enabled.

42d46a37b8fa opensearch-alerting 2.11.0.0 42d46a37b8fa opensearch-anomaly-detection 2.11.0.0 42d46a37b8fa opensearch-asynchronous-search 2.11.0.0 42d46a37b8fa opensearch-cross-cluster-replication 2.11.0.0 42d46a37b8fa opensearch-custom-codecs 2.11.0.0 42d46a37b8fa opensearch-geospatial 2.11.0.0 42d46a37b8fa opensearch-index-management 2.11.0.0 42d46a37b8fa opensearch-job-scheduler 2.11.0.0 42d46a37b8fa opensearch-knn 2.11.0.0 42d46a37b8fa opensearch-ml 2.11.0.0 42d46a37b8fa opensearch-neural-search 2.11.0.0 42d46a37b8fa opensearch-notifications 2.11.0.0 42d46a37b8fa opensearch-notifications-core 2.11.0.0 42d46a37b8fa opensearch-observability 2.11.0.0 42d46a37b8fa opensearch-performance-analyzer 2.11.0.0 42d46a37b8fa opensearch-reports-scheduler 2.11.0.0 42d46a37b8fa opensearch-security 2.11.0.0 42d46a37b8fa opensearch-security-analytics 2.11.0.0 42d46a37b8fa opensearch-sql 2.11.0.0

Screenshots image

image

Host/Environment (please complete the following information):

kirubasankars commented 10 months ago

Not an issue. its a documentation bug. Documentation mentioned pipeline instead of search_pipeline