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

[2.26.x] Support ID query paging #6737

Merged
merged 1 commit into from
May 19, 2023

Conversation

derekwilhelm
Copy link
Contributor

What does this PR do?

When issuing a query for IDs that exceed the requested page size, solr returns the full list of results rather than the requested page size. This causes the catalog framework to throw away those results beyond the page size limit and give the impression to any calling code that the next page could be requested. However, since ID queries are changed to solr real time get requests, requesting the next page doesn't work. Solr ignores all of the paging parameters when utilizing the real time get handler. This means that solr will again return the full list of documents and cause the catalog framework to return the same list of results it did for page 1 as page 2. This PR works around this limitation such that if paging parameters are received it will not do a real time get request.

Who is reviewing it?

@pklinef
@clockard

Select relevant component teams:

@codice/solr

Ask 2 committers to review/merge the PR and tag them here.

@glenhein
@jlcsmith

How should this be tested?

  1. Ingest or create several metacards
  2. Query the catalog for all of the created metacards by their IDs and set the page size to smaller than the total number of metacards. For example: if there are 10 metacards, set the page size to 5
  3. Verify the first page of results are returned
  4. Adjust the start index to the second page and issue the query again
  5. Verify the second page of results are returned as expected (previously this would be the same list of results as the first query)

Any background context you want to provide?

What are the relevant tickets?

Fixes: #____

Screenshots

Checklist:

  • Documentation Updated
  • Update / Add Threat Dragon models
  • Update / Add Unit Tests
  • Update / Add Integration Tests

Notes on Review Process

Please see Notes on Review Process for further guidance on requirements for merging and abbreviated reviews.

Review Comment Legend:

  • ✏️ (Pencil) This comment is a nitpick or style suggestion, no action required for approval. This comment should provide a suggestion either as an in line code snippet or a gist.
  • ❓ (Question Mark) This comment is to gain a clearer understanding of design or code choices, clarification is required but action may not be necessary for approval.
  • ❗ (Exclamation Mark) This comment is critical and requires clarification or action before approval.

@derekwilhelm
Copy link
Contributor Author

build now

@cxddfbot
Copy link

Internal build has been started, your results will be available at build completion.

@clockard
Copy link
Contributor

✅ Successfully tested functionality through a downstream project.

@cxddfbot
Copy link

Build SUCCESS See the job results in legacy Jenkins UI or in Blue Ocean UI.

@clockard clockard merged commit 0466b54 into codice:2.26.x May 19, 2023
@derekwilhelm derekwilhelm mentioned this pull request Jun 2, 2023
4 tasks
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.

6 participants