-
Notifications
You must be signed in to change notification settings - Fork 24
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
[RFC] OpenSearch Querqy Plugin Design Document #2
Comments
Hey @ps48, This looks great! The one question I have is about "7. Open Questions" / Should the plugin be multi-tenant? - What would multi-tenancy mean in this context? (We'd have a few ways to implement multi-tenancy out-of-the-box) |
Hi @renekrie, Multi-tenancy is not usually a Opensearch feature. This feature comes from OpenSearch Dashboards, when users are from different tenants are separated virtually and cannot see one other's data (more on this here). This will be a useful feature when we have a SMUI or a similar plugin UI on OpenSearch Dashboards. |
Preview on Querqy and Relevance Workbench querqy-demo-1080.mp4 |
PR Drafts: |
This looks awesome @ps48 |
For number 4. Should the plugin code be moved to OpenSearch project? What are the pros and cons? The implications of moving the plugin to opensearch-project are not totally clear to me. Are we also asking if the plugin should be part of the OpenSearch distribution? I see a matrix of possibilities here:
Is that what we want to discuss more deeply? Are there more options? I would say that any plugin included in the distribution should have application for multiple use cases (i.e. at least two of search, observability, log analytics, query offload, other?). If not, then it should be a self-install and OpenSearch should provide better ways to integrate by user choice. Additionally, we should encourage people to create new plugins for OpenSearch so if it is prohibitive today for OpenSearch to bless a plugin/extension without moving it to the opensearch-project, we should try to understand those issues better and see if we can work through them. |
We're going to close out this particular issue. Work has been done to get Querqy working with OpenSearch. See https://docs.querqy.org/querqy/index.html for instructions on installing Querqy as an OpenSearch plugin and how to get started. We are working on an overall API to more easily integrate components that preprocess search requests and post-process search responses. Integrating Querqy as a request preprocessor should probably be tracked with that work. |
OpenSearch Querqy Plugin Design Document
Plugin Code: https://github.com/querqy/querqy-opensearch
Querqy Project: https://querqy.org/
1. What is Querqy?
A query rewriting library. It helps you to tune your search results for specific search terms. It also comes with some query-independent search relevance optimisations. You can plugin in your own query rewriter. Available for Solr and Elasticsearch. Querqy is a query rewriting framework for Java-based search engines. It is probably best-known for its rule-based query rewriting, which applies synonyms, query dependent filters, boostings and demoting of documents. This rule-based query rewriting is implemented in the ‘Common Rules Rewriter’, but Querqy’s capabilities go far beyond this rewriter.
2. How does Querqy fit in the Search Relevancy Ecosystem?
Querqy Plugin will be a crucial part of our search relevancy project. It is the starting point for users to dive into query relevancy and optimization. Users can then add Querqy rules to deal with synonyms, query relaxations (with number units, replacements) and word breaks. More details on Search Relevancy RFC
3. What are Re-writers in Querqy?
Rewriters manipulate the query that was entered by the user. They can change the result set by adding alternative tokens, by removing tokens or by adding filters. They can also influence the ranking by adding boosting information. A single query can be rewritten by more than one rewriter. Together they form the rewrite chain.
4. Different rewriters available:
5. OpenSearch Querqy Plugin
5.1 Sample Usage with Synonym rules
5.2 Architecture
The plugin would work similar to Querqy’s ES plugin
5.3 Configuration Options/Settings
The Querqy plugin needs three configuration settings:
NOTE: More details on caching in section 5.5
5.4 Index
Querqy index →
.opensearch-querqy
All the Querqy configurations like rules, synonyms, word breaks, etc will be stored in a new plugin index called
.opensearch-querqy.
For each rewriter a separate doc is formed inside the index. Below is a sample ofcommon_rules
stored in the plugin.5.5 Processed rule caching
Usually users have thousand of rules in their index. Processing these rules and converting them to object factories take considerable amount of time, this processing cannot be done per request. Hence, the plugin resorts to caching the processed rules. The cache is build for each rewriter on the first search request made by any user. The cache stored is reloaded with each
PUT request
made to the querqy plugin. The cache is cleared when a particular rewriter is deleted with aDELETE request
.5.6 Security & FGAC
5.6.1 Access Control for querying over an index:
5.6.2 Access Control for plugin and its index:
Plugin Users:
Admin User : creating rules read/update/delete [All CRUD]
Search User: searches with querqy, not to view the rules but use it. [Only Read]
.opensearch-querqy
403
error response.403
error response.More discussion about the issue here: querqy/querqy-opensearch#14
6. References:
7. Open Questions:
The text was updated successfully, but these errors were encountered: