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

3664 search result indexing #3691

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

michaelabuckley
Copy link
Contributor

@michaelabuckley michaelabuckley commented Jun 10, 2022

Avoid the database traffic required for sequence fetching by using a natural composite PK.

Supports #3664
Addresses #866

Search result caching is on the query hot-path.  We can use the natural composite key instead of the pid here.
Copy link
Collaborator

@tadgh tadgh left a comment

Choose a reason for hiding this comment

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

Looks good to me, just a few minor questions, non-blocking


@Modifying
@Query("DELETE FROM SearchResult r WHERE r.mySearchPid = :search and r.myOrder >= :rangeStart and r.myOrder < :rangeStart + :maxCount")
int deleteForParentWithLimit(@Param("search") Long theSearchPid, @Param("rangeStart") int theStart, @Param("maxCount") int theCount);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Question: Does this mean parent as in parent Search ? I guess I'm confused by what parent means here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. I'll rename.

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