-
Notifications
You must be signed in to change notification settings - Fork 116
Lucene: index filters support #3688
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
Conversation
...ayer-lucene/src/test/java/com/apple/foundationdb/record/lucene/LuceneOnlineIndexingTest.java
Show resolved
Hide resolved
...ayer-lucene/src/test/java/com/apple/foundationdb/record/lucene/LuceneOnlineIndexingTest.java
Show resolved
Hide resolved
...ayer-lucene/src/test/java/com/apple/foundationdb/record/lucene/LuceneOnlineIndexingTest.java
Show resolved
Hide resolved
...ayer-lucene/src/test/java/com/apple/foundationdb/record/lucene/LuceneOnlineIndexingTest.java
Outdated
Show resolved
Hide resolved
...d-layer-lucene/src/main/java/com/apple/foundationdb/record/lucene/LuceneIndexMaintainer.java
Outdated
Show resolved
Hide resolved
| assertNotEquals(needMerge, filterOut); | ||
| } | ||
|
|
||
| private TestRecordsTextProto.MapDocument multiEntryMapDoc(long id, String text, int group) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a test that fails:
- filter returns
SOME - filter throws exception
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
√
...ayer-lucene/src/test/java/com/apple/foundationdb/record/lucene/LuceneIndexTestDataModel.java
Show resolved
Hide resolved
ScottDugas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can discuss offline about the coupling between the test and LuceneIndexTestDataModel, I clearly had a vision for that that did not come through in the comments/code.
...ava/com/apple/foundationdb/record/provider/foundationdb/indexes/StandardIndexMaintainer.java
Show resolved
Hide resolved
...d-layer-lucene/src/main/java/com/apple/foundationdb/record/lucene/LuceneIndexMaintainer.java
Show resolved
Hide resolved
...d-layer-lucene/src/main/java/com/apple/foundationdb/record/lucene/LuceneIndexMaintainer.java
Show resolved
Hide resolved
...ayer-lucene/src/test/java/com/apple/foundationdb/record/lucene/LuceneOnlineIndexingTest.java
Outdated
Show resolved
Hide resolved
...ayer-lucene/src/test/java/com/apple/foundationdb/record/lucene/LuceneOnlineIndexingTest.java
Show resolved
Hide resolved
...ayer-lucene/src/test/java/com/apple/foundationdb/record/lucene/LuceneScanAllEntriesTest.java
Outdated
Show resolved
Hide resolved
...ayer-lucene/src/test/java/com/apple/foundationdb/record/lucene/LuceneScanAllEntriesTest.java
Outdated
Show resolved
Hide resolved
...ayer-lucene/src/test/java/com/apple/foundationdb/record/lucene/LuceneScanAllEntriesTest.java
Outdated
Show resolved
Hide resolved
...ayer-lucene/src/test/java/com/apple/foundationdb/record/lucene/LuceneScanAllEntriesTest.java
Show resolved
Hide resolved
...d-layer-lucene/src/main/java/com/apple/foundationdb/record/lucene/LuceneIndexMaintainer.java
Show resolved
Hide resolved
...ene/src/main/java/com/apple/foundationdb/record/lucene/LuceneIndexScrubbingToolsMissing.java
Outdated
Show resolved
Hide resolved
| try (FDBRecordContext context = openContext()) { | ||
| // overwrite records | ||
| dataModel.saveRecords(10, context, 2); | ||
| commit(context); | ||
| } | ||
|
|
||
| try (FDBRecordContext context = openContext()) { | ||
| // The same filter should apply to index scrubbing - else "missing" index entries will be detected | ||
| final long missingIndexEntries = dataModel.findMissingIndexEntries(context, null); | ||
| assertEquals(0, missingIndexEntries); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test now seems even further from testing the scan functionality.
If you put the filter somewhere shareable, it should be pretty easy to put the testing of scrubbing in LuceneIndexScrubbingTest, and putting this others in LuceneIndexMaintenanceTest which feels appropriate to me. Although, maybe it would be best to just have a new class for filtered lucene indexes.
Perhaps not the highest priority though.
...ayer-lucene/src/test/java/com/apple/foundationdb/record/lucene/LuceneScanAllEntriesTest.java
Outdated
Show resolved
Hide resolved
...ayer-lucene/src/test/java/com/apple/foundationdb/record/lucene/LuceneScanAllEntriesTest.java
Outdated
Show resolved
Hide resolved
...ayer-lucene/src/test/java/com/apple/foundationdb/record/lucene/LuceneScanAllEntriesTest.java
Outdated
Show resolved
Hide resolved
...ayer-lucene/src/test/java/com/apple/foundationdb/record/lucene/LuceneScanAllEntriesTest.java
Outdated
Show resolved
Hide resolved
...ayer-lucene/src/test/java/com/apple/foundationdb/record/lucene/LuceneScanAllEntriesTest.java
Outdated
Show resolved
Hide resolved
...ayer-lucene/src/test/java/com/apple/foundationdb/record/lucene/LuceneScanAllEntriesTest.java
Outdated
Show resolved
Hide resolved
...ene/src/main/java/com/apple/foundationdb/record/lucene/LuceneIndexScrubbingToolsMissing.java
Outdated
Show resolved
Hide resolved
Add support for index filters by predicates or by IndexMaintenanceFilter. However, Lucene can only support ALL or NONE. Filtering SOME will cause an exception. Resolves FoundationDB#3065
c294935 to
6746ecb
Compare
|
Rebase to "fix" line numbers and see if it affects Teamscale's Test Gaps. |
Add support for index filters by predicates or by IndexMaintenanceFilter.
However, Lucene can only support ALL or NONE. Filtering SOME will cause an exception.
Resolves #3065