Conversation
|
Hi @mridula-s109, I've created a changelog YAML for you. |
|
Pinging @elastic/search-eng (Team:SearchOrg) |
|
Pinging @elastic/search-relevance (Team:Search - Relevance) |
kderusso
left a comment
There was a problem hiding this comment.
Quick pass through, I'm surprised this works without registering the retriever?
...es/src/yamlRestTest/resources/rest-api-spec/test/searchbusinessrules/10_pinned_retriever.yml
Outdated
Show resolved
Hide resolved
Pull request was converted to draft
f162bac to
9bc751a
Compare
|
Hi @mridula-s109, I've created a changelog YAML for you. |
* Fix compilation error * Remove SearchPlugin from META-INF * Remove duplicate FeatureSpecification * Add service as test resource * Move to test * More file moving * Remove from module-info, remove file * Make search business rules plugin extensible * fix ent search plugin * Delete dup files * [CI] Auto commit changes from spotless * Add module info back in --------- Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
kderusso
left a comment
There was a problem hiding this comment.
Some hopefully final feedback! Thanks for your iterations on this.
As a best practice it would be good to request review from the Search Relevance team so everyone on the team is aware of this PR.
Awaiting CI and final changes but this is really close!
...plugin/rank-rrf/src/yamlRestTest/resources/rest-api-spec/test/rrf/950_pinned_interaction.yml
Show resolved
Hide resolved
...ess-rules/src/main/java/org/elasticsearch/xpack/searchbusinessrules/SearchBusinessRules.java
Outdated
Show resolved
Hide resolved
.../main/java/org/elasticsearch/xpack/searchbusinessrules/retriever/PinnedRetrieverBuilder.java
Outdated
Show resolved
Hide resolved
.../main/java/org/elasticsearch/xpack/searchbusinessrules/retriever/PinnedRetrieverBuilder.java
Outdated
Show resolved
Hide resolved
.../src/yamlRestTest/resources/rest-api-spec/test/search-business-rules/10_pinned_retriever.yml
Outdated
Show resolved
Hide resolved
.../src/yamlRestTest/resources/rest-api-spec/test/search-business-rules/10_pinned_retriever.yml
Outdated
Show resolved
Hide resolved
.../src/yamlRestTest/resources/rest-api-spec/test/search-business-rules/10_pinned_retriever.yml
Outdated
Show resolved
Hide resolved
.../src/yamlRestTest/resources/rest-api-spec/test/search-business-rules/10_pinned_retriever.yml
Outdated
Show resolved
Hide resolved
.../src/yamlRestTest/resources/rest-api-spec/test/search-business-rules/10_pinned_retriever.yml
Outdated
Show resolved
Hide resolved
.../src/yamlRestTest/resources/rest-api-spec/test/search-business-rules/10_pinned_retriever.yml
Show resolved
Hide resolved
…, as i had made changes related to the cluster error
I have resolved all the comments @kderusso , hopefully the ci build passes through and everything works as intended. |
| public static final TransportVersion INTRODUCE_FAILURES_LIFECYCLE = def(9_065_0_00); | ||
| public static final TransportVersion PROJECT_METADATA_SETTINGS = def(9_066_00_0); | ||
| public static final TransportVersion AGGREGATE_METRIC_DOUBLE_BLOCK = def(9_067_00_0); | ||
| public static final TransportVersion PINNED_RETRIEVER = def(9_068_0_00); |
There was a problem hiding this comment.
just a side note - but when we backport this to 8.19, we need to pay extra attention on how we backport this transport version
There was a problem hiding this comment.
Yeah @mridula-s109 - we will create a PINNED_RETRIEVER_8_19 transport version
kderusso
left a comment
There was a problem hiding this comment.
Looks great! Thanks for all the iterations!
| public static final TransportVersion INTRODUCE_FAILURES_LIFECYCLE = def(9_065_0_00); | ||
| public static final TransportVersion PROJECT_METADATA_SETTINGS = def(9_066_00_0); | ||
| public static final TransportVersion AGGREGATE_METRIC_DOUBLE_BLOCK = def(9_067_00_0); | ||
| public static final TransportVersion PINNED_RETRIEVER = def(9_068_0_00); |
There was a problem hiding this comment.
Yeah @mridula-s109 - we will create a PINNED_RETRIEVER_8_19 transport version
💔 Backport failed
You can use sqren/backport to manually backport by running |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
Pinned Retriever for Elasticsearch
This PR introduces a new
pinnedretriever for Elasticsearch, available under thesearch-business-rulesplugin.The
pinnedretriever allows users to explicitly pin specific documents (viaidsordocs) so they always appear at the top of the search results, regardless of their organic relevance score. It is implemented as a compound retriever that rewrites internally to aPinnedQueryBuilder.Key Features
_idor by providing inline doc content."explain": true, the search response now includes a custom_explanationfield for pinned results.Example:
Example API Request
Sample Response