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 ID query paging #6742

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

derekwilhelm
Copy link
Contributor

What does this PR do?

Forward port of PR #6737

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

@@ -232,6 +229,18 @@ public SourceResponse query(QueryRequest request) throws UnsupportedQueryExcepti
return new SourceResponseImpl(request, responseProps, results, totalHits);
}

private boolean shouldDoRealTimeGet(QueryRequest request) throws UnsupportedQueryException {
Query query = request.getQuery();
if (query.getStartIndex() > 1) {
Copy link
Member

Choose a reason for hiding this comment

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

❓ I wonder if we should put something into the query response properties to indicate we ignored the real time get request? Or maybe add a debug log instead of this comment to help someone debugging a request?

@stale
Copy link

stale bot commented Aug 12, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@derekwilhelm
Copy link
Contributor Author

build now

@cxddfbot
Copy link

cxddfbot commented Nov 2, 2023

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

@cxddfbot
Copy link

cxddfbot commented Nov 3, 2023

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

@derekwilhelm
Copy link
Contributor Author

build now

@cxddfbot
Copy link

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

@cxddfbot
Copy link

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

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.

5 participants