-
Notifications
You must be signed in to change notification settings - Fork 54
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
ql:contains-word
now can show the score of the word match in the respective text
#1397
Conversation
modified: src/index/IndexImpl.Text.cpp modified: test/QueryPlannerTestHelpers.h modified: test/engine/TextIndexScanForWordTest.cpp Problems: |
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 already looks very nice, I only have a few comments, but the most things we have already discussed today.
Quality Gate passedIssues Measures |
…adapted unit tests. Missing e2e tests.
Commit doesn't contain all changes necessary for pull request yet.
…x. This is done through passing the words and docsfile as string, and then building the text index as normal. Basic Test is existent (TODO make more edge case tests) and e2e testing is fixed.
…re still unstable because of the way nofContexts are counted. Implemented new more refined tests.
Everything should be fixed now. Tests are complete and scores are shown. Also new test methods to build a text index are implemented. |
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.
Thank you very much.
As the last round here was quite some time ago, I did another full review, but in general this code looks nice and clean, I only have several small nitpicks, most of which should be easy to fix.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1397 +/- ##
==========================================
+ Coverage 89.67% 89.80% +0.12%
==========================================
Files 383 385 +2
Lines 36942 36995 +53
Branches 4174 4181 +7
==========================================
+ Hits 33129 33223 +94
+ Misses 2512 2477 -35
+ Partials 1301 1295 -6 ☔ View full report in Codecov by Sentry. |
…1665) Each operation now has a `bool` that determines whether the results can be stored in the cache or not (whether it is actually stored depends on other circumstances, like the available cache size). That `bool` does not have to be fixed when the operation is created, but can be changed. For example, this is useful for index scans that only return a subset of their full result (because of another constraining operation, like a join or a filter).
This is a first step towards making QLever compile with C++17. If the compile-time flag `QLEVER_CPP_17` is set, use Eric Niebler's `range-v3` library as a drop-in replacement for `std::ranges`. In the code, we simply write `ql::ranges` instead of `std::ranges` in most places. Some places need special treatment. For example, where `std::ranges` was used as a C++20 concept, we now use the macros `CPP_template` and `CPP_and` (also from the `range-v3` library), which does the right thing for both C++20 and C++17.
… saving nofNonLiterals in the configuration json file.
…g saved in the TextMetaData and instead saving nofNonLiterals in the configuration json file." This reverts commit 1adcecb.
…adapted unit tests. Missing e2e tests.
…x. This is done through passing the words and docsfile as string, and then building the text index as normal. Basic Test is existent (TODO make more edge case tests) and e2e testing is fixed.
…re still unstable because of the way nofContexts are counted. Implemented new more refined tests.
…o the wordsFileContent and docsFileContent strings. Now you can clearly see what lines are added and can writing tests is cleaner
…in the wordsFileContent and docsFileContent as pair contentsOfWordsFileAndDocsFile
Signed-off-by: Johannes Kalmbach <[email protected]>
… saving nofNonLiterals in the configuration json file.
…g saved in the TextMetaData and instead saving nofNonLiterals in the configuration json file." This reverts commit 1adcecb.
… saving nofNonLiterals in the configuration json file.
…tIndex everywhere aswell as num-non-literals to nom-non-literals-text-index
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.
One last run of the checks and then we can finally merge this.
Conformance check passed ✅No test result changes. |
Quality Gate passedIssues Measures |
ql:contains-word
now can show the score of the word match in the respective text
The fulltext index of QLever has forever been able to associate the occurence of a word in a text with a score.
This PR adds the functionality to actually retrieve this score and to use it in the remainder of the query.
Currently the score is bound to a variable the name of which is automatically determined from the involved literals and variables. The easiest way to get the names of these variables is to use
SELECT *
or to look at the runtime information tree.