Opened 2 years ago
Last modified 2 weeks ago
#495 in_review defect
WebSearch: improve/fix "NOT" operator
| Reported by: | jcaffaro | Owned by: | simko |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | WebSearch | Version: | |
| Keywords: | INSPIRE syntax | Cc: |
Description
When a query includes a "NOT" expression for which there is no result, the search engine returns no result, whatever the rest of the query matches. For example the following query does not return any result on the Atlantis Demo Site:
muon -foo
though "muon" matches some documents (and "foo" does not).
One could expect to still get the documents matching "muon".
Change History (10)
comment:1 Changed 2 years ago by jcaffaro
comment:2 Changed 2 years ago by simko
Yes, the search engine is currently kind of overly concerned about typos and
stuff in user-typed search terms, so if there is a non-existent term, it emits
a warning and pauses. We may want to change this policy to be consistent with
behaviour of any Boolean query (e.g. muon OR foo and muon NOT foo should
behave the same way).
comment:3 Changed 2 years ago by valkyrie
- Keywords syntax added
- Owner set to valkyrie
- Status changed from new to assigned
- Type changed from enhancement to defect
comment:4 Changed 2 years ago by valkyrie
- Status changed from assigned to in_merge
This was actually fixed as a consequence of directing queries through the parenthesised parser.
The fix is available in my public AFS repo as 269-453-495-direct_through_parend_parser
comment:5 Changed 2 years ago by tbrooks
- Keywords INSPIRE added
comment:6 Changed 2 years ago by valkyrie
- Status changed from in_merge to assigned
comment:7 Changed 2 years ago by valkyrie
- Status changed from assigned to in_work
comment:8 Changed 2 years ago by valkyrie
the work on this has been removed from the paren'd parser ticket, but a test (which currently fails) has been added to the regression tests in branch 269-453-parend_parser_improvements
I will begin work on this via some means which does not involve the paren'd parser.
comment:9 Changed 2 years ago by valkyrie
- Status changed from in_work to in_merge
comment:10 Changed 2 weeks ago by simko
- Owner changed from valkyrie to simko
- Status changed from in_merge to in_review

Note that the same query can work in "advanced search" mode:
http://invenio-demo.cern.ch/search?as=1&m1=a&p1=muon&f1=&op1=n&m2=a&p2=foo
But the search engine still reports unnecessarily that keyword "foo" was not found.
This box should probably not be displayed for terms that we are expecting not to find.