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

Pagination for single field queries #251

Merged
merged 4 commits into from
Jan 3, 2023
Merged

Pagination for single field queries #251

merged 4 commits into from
Jan 3, 2023

Conversation

vicilliar
Copy link
Contributor

@vicilliar vicilliar commented Dec 29, 2022

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    Pagination feature

  • What is the current behavior? (You can also link to an open issue here)
    Currently, results cannot be paginated. See issue: Pagination [ENHANCEMENT] #71

  • What is the new behavior (if this is a feature change)?
    This introduces an offset parameter, which allows users to skip results (for pagination). This uses the from and size parameters of open search.

There are some issues with skipping/duplication of results near the edges of the first few pages (around 3% of results affected overall) in tensor search specifically. This is believed to be an issue with OpenSearch KNN, and is being observed in the issue here: opensearch-project/k-NN#698

For now, the unit tests for pagination do not assume exact precision in results when using pagination.

Additionally, verbose parameter was added to _lexical_search and _vector_text_search for debugging purposes.

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
    No.

  • Have unit tests been run against this PR? (Has there also been any additional testing?)
    Yes.

  • Related Python client changes (link commit/PR here)
    Pagination offset parameter implemented py-marqo#49

  • Related documentation changes (link commit/PR here)
    https://github.com/marqo-ai/marqodocs/pull/42

  • Other information:

  • Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added / updated (for bug fixes / features)

@vicilliar vicilliar temporarily deployed to marqo-test-suite December 29, 2022 09:13 — with GitHub Actions Inactive
# TODO: re-add this assert when KNN incosistency bug is fixed
# assert full_search_results["hits"] == paginated_search_results["hits"]


Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: one newline between class methods

@pandu-k pandu-k temporarily deployed to marqo-test-suite January 3, 2023 07:27 — with GitHub Actions Inactive
@pandu-k pandu-k temporarily deployed to marqo-test-suite January 3, 2023 07:27 — with GitHub Actions Inactive
@pandu-k pandu-k temporarily deployed to marqo-test-suite January 3, 2023 07:27 — with GitHub Actions Inactive
@pandu-k pandu-k temporarily deployed to marqo-test-suite January 3, 2023 07:27 — with GitHub Actions Inactive
@pandu-k pandu-k temporarily deployed to marqo-test-suite January 3, 2023 07:27 — with GitHub Actions Inactive
@pandu-k pandu-k temporarily deployed to marqo-test-suite January 3, 2023 07:27 — with GitHub Actions Inactive
@vicilliar vicilliar merged commit 590965d into mainline Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants