-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reimplement functionality similar to PinnedQueryBuilder #72
Comments
Is your feature request related to a problem? Please describe. What we need already implemented in X-Pack https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-pinned-query.html#query-dsl-pinned-query It will be cool to have it back. |
Pending more votes from the community to prioritize it. |
It's starting to get some traction! C'mon! This works like a charm when mixing ES with a recommendation engine. 🚀 Like AWS Personalize 😉 |
Hello @anasalkouz! Quick question: is there any vote threshold needed to start prioritizing this feature? Is there anything that we can do to help move this forward? Thanks in advanced! |
There is a contributor @Aero-Blue who composed a design document for the feature, and wrote some code aiming to make the feature as a plugin. If anyone has got the interest to implement the feature, please feel free to refer to those achievements. Code (July 2022): https://github.com/Aero-Blue/opensearch-pinned-query Design Document (June 2022): Search Result Pinning - Design1. OverviewProject Title:Implement pinning selected documents in query results of OpenSearch Project Description:The project is to resolve the Github issue: #72, which is a feature request for OpenSearch from the community. The process to complete the project includes figuring out the specific demand of the user for this feature, looking for possible solutions, and finally delivering a solution to the satisfy the demand. The solution can be contributing new codes to either opensearch-project or other open-source projects that can be used with OpenSearch, such as querqy. In the above Github issue, there are several OpenSearch users asked for implementing the non-opensource feature of Elasticsearch “Pinned Query” in OpenSearch. The feature is a kind of search query which promotes selected documents to rank higher than those matching the given query so that the selected documents can always be displayed above organic search results. 2. Problem Statement/ Use casesProblem StatementThere is currently no way to pin certain search results to make sure they are always at the top of the list of results returned by OpenSearch. Use Cases
3. Goals/ Requirements and scopeMust have requirements
Simply just “pinning” some results to the top may work for some use cases (i.e. general ads or promotions) but the user could possibly benefit from having some more control or customization over the pinned elements in their appearance and description. Nice to have requirementsHere are two other possible needs the user might have and why:
With these options implemented the user would be able to order pinned results, either randomly or with a specific order, and would be able to label the pinnings to give a clearer idea of their purpose. 4. Glossary/Terminology
5. Proposed solutionScore modifications
5.2 Sequence Diagram (optional)Here is what a
Here is what a standard
5.3.1 Pros
5.3.2 Cons
6. Other Approaches6.1 Using QuerqyFrom the Qeurqy docs:
Note the features of boosting and demoting documents. The Product Manager said that there would have to be modifications made to Querqy’s source code in order to make it work.
6.1.2 Cons
6.2 Modifying document attributesThe search results we receive after a query are a series of objects known as “documents”. These documents contain the information about the result.
Note that I have added the attribute
6.2.1 Cons
7. Cost AnalysisNot applicable to this project as there are no outside services used that would require payment. 8. Backwards compatibilityAdding this feature would not be a breaking change as it is adding functionality and would not require removing anything. Therefore it can be released in a minor version and be backwards compatible. 9. AppendixAppendix A: FAQ
|
Thanks @tlfeng. I am the original contributor for this project, it is incomplete because I had to leave due to medical issues unfortunately. I didn’t have time to update the design document but after further research it was decided that it would be best implemented as a plugin. I was able to figure out and modify the requests to include 2 attributes, |
Querqy has been ported to OpenSearch and works with OpenSearch 2.3. |
@macrakis Shall we close this issue then? |
PinnedQueryBuilder is removed as part of removal x-pack, this is a track ticket to develop similar functionality in OpenSearch.
https://github.com/elastic/elasticsearch/blob/v7.10.2/client/rest-high-level/src/test/java/org/elasticsearch/client/SearchIT.java#L1385
The text was updated successfully, but these errors were encountered: