fix(search): make openSearch and bleve behave the same - #3408
Conversation
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| CodeStyle | 1 minor |
🟢 Metrics 26 complexity · 57 duplication
Metric Results Complexity 26 Duplication 57
🟢 Coverage 72.33% diff coverage · +0.35% coverage variation
Metric Results Coverage variation ✅ +0.35% coverage variation (-1.00%) Diff coverage ✅ 72.33% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (ffbfe17) 84501 18925 22.40% Head commit (1bde3d1) 84816 (+315) 19295 (+370) 22.75% (+0.35%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#3408) 506 366 72.33% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Good questions raised by @butonic, wouldn't approve merging it currently
both engines now agree on names, titles, tags, paths, types, sizes, dates, hidden flags, facet values and wildcards. quotes only delimit phrases and the equals operator matches the whole field value, following the kql spec. the index name carries a generation so a changed mapping starts on a fresh index, MIGRATION.md says how to fill it.
e6cf23e to
5c153ff
Compare
Adopts the parity-pinned semantics from #3408: 'report' does not match 'reports'; the porter fulltext analyzer is gone.
…routing From #3408: hidden takes bool words only, type categories map to the stored value in the shared pass, ? counts as a wildcard, a non-suffix wildcard on a word-broken field forgives the extension, = matches the whole value on the lowercased sibling, paths lose their trailing slash. Dead compiler helpers removed.
Adopts the parity-pinned semantics from #3408: 'report' does not match 'reports'; the porter fulltext analyzer is gone.
…routing From #3408: hidden takes bool words only, type categories map to the stored value in the shared pass, ? counts as a wildcard, a non-suffix wildcard on a word-broken field forgives the extension, = matches the whole value on the lowercased sibling, paths lose their trailing slash. Dead compiler helpers removed.
Description
since we have support for bleve and openSearch as search backends, we also have to take care that those engines behave the same (at least in all basic cases), which was not the case ash shown in the table.
newnew-foldernew-folderreportReport.txtname:newnew-foldernew-foldername:"new"new-foldername:"*report"Report.txtname:"*übung*"Übung.txtÜbung.txtTitle:quarterlyq1.htmlq1.htmlTitle:QUARTERLYq1.htmlq1.htmltitle:quarterlyq1.htmlContent:reportmonthly.txtContent:"reports monthly"monthly.txtmediatype:TEXT/MARKDOWNnotes.mdnotes.mdpath:"./parent"parentparent,child.pdfparent,child.pdftype:filetype:foldersize>100hidden:truehidden.txthidden.txtFavorites:"A1B2-Upper"starred.txtstarred.txtor more detailed here
for that reason, the pr contains a new test suite which runs the same tests against each search backend which proves the compatibility between the two.
The suite produces a markdown document at the end which lists the test cases and shows the similarity between bleve and openSearch.
while writing that engine i stumbled across some inconsistencies which are fixed now too, in a nutshell:
unfortunately all that also means, we have to create a new index mapping for openSearch but also for bleve, so the PR can be considered breaking and should not to into the next minor version. For details please read services/search/MIGRATION.md.
it also acts as a transition point to:
Motivation and Context
Searching for a name, a tag or inside a folder returned wrong or no results.
How Has This Been Tested?
Types of changes
Checklist: