fix(search): match names, tags and paths as indexed [opensearch] - #3408
fix(search): match names, tags and paths as indexed [opensearch]#3408fschade wants to merge 3 commits into
Conversation
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| CodeStyle | 2 minor |
🟢 Metrics 17 complexity · 9 duplication
Metric Results Complexity 17 Duplication 9
🟢 Coverage 73.53% diff coverage · 0.00% coverage variation
Metric Results Coverage variation ✅ 0.00% coverage variation (-1.00%) Diff coverage ✅ 73.53% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (0c601bb) 84494 19647 23.25% Head commit (a4730b2) 84510 (+16) 19648 (+1) 23.25% (0.00%) 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) 34 25 73.53% 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.
|
|
||
| There are two ways out. | ||
|
|
||
| > `$OS` (the OpenSearch address), `opencloud-resource` (default) index name. |
There was a problem hiding this comment.
I cannot parse this line ... can you make it more explicit? what does $OS have to do with this?!?
| # start opencloud, it creates the index from the current definition | ||
| opencloud search index --all-spaces |
There was a problem hiding this comment.
do I get that right: if between these two lines a new file is added in the web ui ... It will create an index
without our analyzer and mappings, ...
and the index needs to be deleted again? How does this relate to line 17-18?
| A million documents take a few minutes. Search keeps working while it runs, | ||
| documents get correct one by one, and the run can be repeated at any time. |
There was a problem hiding this comment.
[...] Search keeps working while it runs,
documents get correct one by one, and the run can be repeated at any time.
So I can implement a migration for kubernetes that runs while opencloud is running? It just can't index new documents while the opencloud-resource index is closed? That contradicts line 32:
# stop opencloud
why?
| A version can bring a new index definition. The service does not start on an index that was built with an | ||
| older one and says so in the error. A new installation is not affected. |
There was a problem hiding this comment.
This really is what bothers me. It prevents pods from starting up. So I cannot upgrade the image first and then do a migration of the index in the background. Why not? Why do we prevent that? Why does the search process have to DIE and kill the whole process, just because the index is not correct. We should degrade gracefully and queue the search events .... which we do, because we have nats. we could just tune the search queue to keep more than 1000 events. That would allow locking the index and running the service in a degraded state ...
Good questions raised by @butonic, wouldn't approve merging it currently
Description
Name, title and tags mappings were created implicitly by openSearch without any direct mapping.
A name or a tag now matches as a whole and is not cut off after 256 characters anymore.
A path is indexed with its case, so searching inside
/Documentsor/documentsfinds the files in it, folder deletion now cleans up the index correctly too.Bleve boolean queries like
hidden:truewas compiled as a string which failed to resolve.Please read
services/search/MIGRATION.md, the update involves some manual steps!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: