[Opensearch] current ES version doesn't allow Collapse with search_after

0

Hi Experts :) I wonder there is a workaround for using search_after with Collapse which isn't served on current AWS Opensearch Version 7.10 https://www.elastic.co/guide/en/elasticsearch/reference/current/collapse-search-results.html

We tried to use an aggregation command with top hit using writer as a key, however, the presented writers bucket had low scores. https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-top-hits-aggregation.html

Simply, we wanted to show the top 10 documents without duplication on the writer.

How can we find a workaround for the current Opensearch Version?

질문됨 일 년 전625회 조회
1개 답변
-1

So the search_after parameter involves the point in time (PIT) API, which is an X-Pack/ElasticSearch exclusive feature due to licensing issues.

I can recommend you try one or both of the following workarounds. First, you can try querying the index using the search call, without the "PIT" part of the query. For instance, like this sample query.

-> GET sample/_search { "size": 2, "query": { "match_all": {} }, "sort": [ {"timestamp": "asc"}, {"FlightNum":"asc"} ] }

Second, you may also find the scroll API useful. This will help you to retrieve large sets of results from a single scrolling search request.

https://www.elastic.co/guide/en/elasticsearch/reference/7.10/paginate-search-results.html#scroll-search-results https://www.elastic.co/guide/en/elasticsearch/reference/7.10/scroll-api.html

AWS
답변함 일 년 전
  • As I mentioned, I want to search the result only with unique writers(no duplication on the list) using Collapse and search_after. But current Opensearch version on AWS couldn't support this feature. Is there any workaround to get the search result with unique writers and paging?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠