Skip to content

Adding retriever specification to _search API #2551

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

Merged
merged 9 commits into from
May 17, 2024

Conversation

pmpailis
Copy link
Contributor

This PR adds the retriever specification to the _search API, as is also defined in the 8.14.0 documentation to be released here .

Closes #2508

@pmpailis
Copy link
Contributor Author

Running make validate locally I get many errors that seem to be unrelated to my changes:

✖ ../output/typescript/types.ts(2894,3): error TS2411: Property 'filters' of type 'Record<string, QueryDslQueryContainer>' is not assignable to 'string' index type 'never'.
export interface AggregationsAdjacencyMatrixAggregation extends AggregationsBucketAggregationBase {
  filters?: Record<string, QueryDslQueryContainer>
  separator?: string
}

@carlosdelest
Copy link
Member

Running make validate locally I get many errors that seem to be unrelated to my changes:

I wouldn't worry about those, as you mention they are not related to your changes. Given that make compile works and make validate does not refer to errors added by your code, I think this is ready for review by the clients team when you feel ready 👍

@pmpailis
Copy link
Contributor Author

Thanks @carlosdelest ! AFAICT there are no new validation errors introduced with these changes, as I'll mark it for review and we can take it from there. :)

@pmpailis pmpailis marked this pull request as ready for review May 13, 2024 10:57
@Anaethelion Anaethelion self-requested a review May 16, 2024 18:29
Copy link
Contributor

@Anaethelion Anaethelion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, I've left a few suggestions to make sure we get the field type right.

Can you check about the RRF Retriever field being optional ? I hav en't found anything that goes in that direction but I may have missed something.

@pmpailis
Copy link
Contributor Author

Can you check about the RRF Retriever field being optional ?

Do you mean the rrf field in RetrieverContainer (link)? If so, it shouldn't be mandatory, we could still have a retriever-based request without rrf (e.g. using just kNN or the standard retriever).

@pmpailis
Copy link
Contributor Author

Thanks for taking a look @Anaethelion ! I've pushed some changes as per your suggestions :)

Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
knn_search 🔴 3/4 3/4
search 🔴 1421/2060 1992/2042

You can validate these APIs yourself by using the make validate target.

Copy link
Contributor

@Anaethelion Anaethelion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@pmpailis pmpailis merged commit 370532a into main May 17, 2024
6 checks passed
@pmpailis pmpailis deleted the feature/2508_add_retrievers_api branch May 17, 2024 08:23
github-actions bot pushed a commit that referenced this pull request May 17, 2024
Anaethelion pushed a commit that referenced this pull request May 17, 2024
(cherry picked from commit 370532a)

Co-authored-by: Panagiotis Bailis <pmpailis@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the retriever API in _search
3 participants