Opened 3 years ago

Last modified 11 months 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 3 years ago by jcaffaro

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.

comment:2 Changed 3 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 3 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 3 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

Last edited 3 years ago by valkyrie (previous) (diff)

comment:5 Changed 3 years ago by tbrooks

  • Keywords INSPIRE added

comment:6 Changed 3 years ago by valkyrie

  • Status changed from in_merge to assigned

comment:7 Changed 3 years ago by valkyrie

  • Status changed from assigned to in_work

comment:8 Changed 3 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 3 years ago by valkyrie

  • Status changed from in_work to in_merge

This has been corrected in branch 495-less_naggy_search_engine in AFS

This branch is built on top of the branches for #41, #453 and #269, since they contain the regression test for this case.

comment:10 Changed 11 months ago by simko

  • Owner changed from valkyrie to simko
  • Status changed from in_merge to in_review
Note: See TracTickets for help on using tickets.