Skip to content
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

Support index-specific IDs in pinned query #67855

Closed
davishmcclurg opened this issue Jan 22, 2021 · 3 comments · Fixed by #74873
Closed

Support index-specific IDs in pinned query #67855

davishmcclurg opened this issue Jan 22, 2021 · 3 comments · Fixed by #74873
Assignees
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team

Comments

@davishmcclurg
Copy link
Contributor

Currently, the pinned query supports promoting documents by _id. This doesn't allow targeting a specific document when searching over multiple indices since _id is only unique to a single index. It would be helpful if you could specify a combination of _index and _id (and cluster for cross-cluster searches?).

Since App Search uses multi-index search for meta engines, it's difficult for us to use a pinned query without additional workarounds (eg, a separate field that combines _index and _id to match on). I think _index support would be enough for our needs.

@davishmcclurg davishmcclurg added >enhancement needs:triage Requires assignment of a team area label labels Jan 22, 2021
@jtibshirani jtibshirani added :Search/Search Search-related issues that do not fall into other categories and removed needs:triage Requires assignment of a team area label labels Jan 22, 2021
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Jan 22, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@markharwood markharwood self-assigned this Jan 26, 2021
@davishmcclurg
Copy link
Contributor Author

@markharwood do you know if this has been worked on or discussed? If not, I was thinking about working on it myself when I have some time.

davishmcclurg added a commit to davishmcclurg/elasticsearch that referenced this issue Jul 1, 2021
The current `ids` option doesn't allow pinning a specific document in a
single index when searching over multiple indices. This introduces a
`documents` option, which is an array of `_id` and optional `_index`
fields to allow index-specific pins.

Closes: elastic#67855
@davishmcclurg
Copy link
Contributor Author

I gave it a shot here: #74873

jtibshirani pushed a commit that referenced this issue Jul 27, 2021
The current `ids` option doesn't allow pinning a specific document in a
single index when searching over multiple indices. This introduces a
`documents` option, which is an array of `_id` and `_index`
fields to allow index-specific pins.

Closes #67855.
jtibshirani pushed a commit to jtibshirani/elasticsearch that referenced this issue Jul 27, 2021
The current `ids` option doesn't allow pinning a specific document in a
single index when searching over multiple indices. This introduces a
`documents` option, which is an array of `_id` and `_index`
fields to allow index-specific pins.

Closes elastic#67855.
jtibshirani added a commit that referenced this issue Jul 27, 2021
The current `ids` option doesn't allow pinning a specific document in a
single index when searching over multiple indices. This introduces a
`documents` option, which is an array of `_id` and `_index`
fields to allow index-specific pins.

Closes #67855.

Co-authored-by: David Harsha <david.harsha@elastic.co>
ywangd pushed a commit to ywangd/elasticsearch that referenced this issue Jul 30, 2021
The current `ids` option doesn't allow pinning a specific document in a
single index when searching over multiple indices. This introduces a
`documents` option, which is an array of `_id` and `_index`
fields to allow index-specific pins.

Closes elastic#67855.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants