-
Notifications
You must be signed in to change notification settings - Fork 187
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
[full-ci] - use KQL as default search query language #7212
Conversation
c59fbe6
to
cd7dd56
Compare
i found one missing part, i'm on it: ocis/services/search/pkg/search/service.go Line 421 in cd7dd56
|
@@ -20,7 +20,7 @@ Feature: Search | |||
|
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.
ops, found one deficiency.
You have switched web to use space dav path, but tests still use only the new DAV path. we need to change it for all tests from apiSpaceSearch.feature like:
Scenario Outline: user can find data from the project space
Given using <dav-path-version> DAV path
When user "Alice" searches for "*fol*" using the WebDAV API
Then the HTTP status code should be "207"
And the search result should contain "4" entries
And the search result of user "Alice" should contain these entries:
| /folderMain |
| /folderMain/SubFolder1 |
| /folderMain/SubFolder1/subFOLDER2 |
| /folderMain/SubFolder1/subFOLDER2/insideTheFolder.txt |
Examples:
| dav-path-version |
| old |
| new |
@skipOnRevaMaster
Examples:
| dav-path-version |
| spaces |
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.
ops, found one deficiency.
You have switched web to use space dav path, but tests still use only the new DAV path. we need to change it for all tests from apiSpaceSearch.feature like:
@ScharfViktor, not exactly sure what you mean, but if you mean that web uses the 'space/*' endpoint for report requests, ...
it's been like that on web master since 5 weeks owncloud/web#9500
I think that also has something to do with the fact that we were on the 7.1 web release in ocis for quite a long time... sorry :(
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.
would be nice to have... but it's also not highest prio since we have fallbacks in ocis....
r.MethodFunc("REPORT", "/remote.php/dav/spaces*", svc.Search) |
the webdav endpoints won't go away, but we shift our focus to a graph api implementation from now on :)
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.
@ScharfViktor, not exactly sure what you mean, but if you mean that web uses the 'space/*' endpoint for report requests, ...
yes, web uses the 'space/*' but api tests use only new DAV Path. I changed it here 109b70e and I'll create PR
after merging your
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.
thanks 😗
@2403905, @aduffeck i had to add dateTime support to the kql <-> bleve parser, compiler, and normalizer. can you please have a look if it's ok for you, specially because of: ocis/services/search/pkg/search/service.go Line 421 in cd7dd56
we should be ok now, i need another web bump because of: can you help @janackermann, @JammingBen |
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.
lgtm from reading the code but I haven't had a chance to test it yet.
…meNode counterpart
Kudos, SonarCloud Quality Gate passed! |
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.
Awesome 👍
We also have issue with the implicit logical operators |
@2403905 thats fine! the normalization could be improved, yes, but the current clients are only sending simple queries (i hope this changes soon ;) ), lets close (merge) this here, improve our tests as a first step and then add the implementations step by step.... we first need to know (find out), what is really needed. |
* enhancement: use kql as default search query language * enhancement: add support for unicode search queries * fix: escape bleve field query whitespace * fix: search related acceptance tests * enhancement: remove legacy search query language * enhancement: add support for kql dateTime restriction node types * chore: bump web to v8.0.0-alpha.2 * fix: failing search api test * enhancement: search bleve query compiler use DateRangeQuery as DateTimeNode counterpart * enhancement: support for colon operators in dateTime kql queries
Description
Use KQL as the default oCIS search query language.
Some examples of a valid KQL query are:
Tag
:tag:golden tag:"silver"
Filename
:name:file.txt name:"file.docx"
Content
:content:ahab content:"captain aha*"
Conjunctive normal form queries:
Boolean
:tag:golden AND tag:"silver
,tag:golden OR tag:"silver
,tag:golden NOT tag:"silver
Group
:(tag:book content:ahab*)
,tag:(book pdf)
Complex queries:
(name:"moby di*" OR tag:bestseller) AND tag:book NOT tag:read
Related Issue
Motivation and Context
Defining a own query language is error prone and leads to a lot of documentation, the oCIS team decided in that ADR to use KQL as our standard. A clear set of rules is set by MS and the dictionary fits well in our usecase.
How Has This Been Tested?
Types of changes
Checklist:
Acceptance tests added