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

Prevent omission of results from collections with different index styles #4869

Merged
merged 3 commits into from
Jul 17, 2023

Conversation

marmoure
Copy link
Collaborator

@marmoure marmoure commented Apr 17, 2023

Fixes #3620

When performing a Search on a parent collection that has several sub-collections each with different types of indexes configured, The optimizer was optimizing the query without checking if all sub-collections were fit to be optimized.

#3620 has a nice test suit to illustrate this issue thanks to @joewiz. This PR now passes all of those tests.


This open source contribution to the exist project was commissioned by the Office of the Historian, U.S. Department of State, https://history.state.gov/.

@marmoure marmoure marked this pull request as draft April 17, 2023 09:44
@marmoure marmoure marked this pull request as ready for review April 17, 2023 11:35
@dizzzz dizzzz changed the title prevent omitting results from collections with different index styles [bugfix] prevent omitting results from collections with different index styles Apr 17, 2023
Copy link
Member

@adamretter adamretter left a comment

Choose a reason for hiding this comment

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

Just some small comments and suggestions.

@dizzzz
Copy link
Member

dizzzz commented Apr 20, 2023

nice work!

@marmoure
Copy link
Collaborator Author

The build is failing for now, once #4924 is merged the build will return to normal

@marmoure marmoure force-pushed the fix/3620 branch 6 times, most recently from c7bb48b to 26f47f3 Compare May 19, 2023 12:57
@sonarcloud
Copy link

sonarcloud bot commented May 19, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 5 Code Smells

78.4% 78.4% Coverage
0.0% 0.0% Duplication

@dizzzz
Copy link
Member

dizzzz commented May 30, 2023

@marmoure please could you rebase?

@adamretter adamretter force-pushed the fix/3620 branch 3 times, most recently from 66dd907 to 60fa4ec Compare July 10, 2023 13:33
marmoure and others added 3 commits July 10, 2023 15:45
…ot just those that have a collection.xconf that uses the newer Lucene based Range Index

Closes eXist-db#3620
…ion in favour of newer Optimizable#canOptimizeSequence(Sequence) function
@sonarcloud
Copy link

sonarcloud bot commented Jul 10, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

84.5% 84.5% Coverage
6.9% 6.9% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@adamretter adamretter self-requested a review July 10, 2023 18:05
@adamretter adamretter changed the title [bugfix] prevent omitting results from collections with different index styles Prevent omission of results from collections with different index styles Jul 10, 2023
Copy link
Member

@adamretter adamretter left a comment

Choose a reason for hiding this comment

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

All LGTM now. Thanks.

@adamretter
Copy link
Member

@dizzzz I think this one is ready to land now.

@line-o line-o merged commit 42fb1d6 into eXist-db:develop Jul 17, 2023
8 of 11 checks passed
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.

[BUG] Query only returns results from "new range index" collection, omitting results from other collections
5 participants