Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

WebSearch: improve/fix "NOT" operator #495

Open
jeromecaffaro opened this Issue · 6 comments

4 participants

@jeromecaffaro
Collaborator

Originally on 2011-02-16

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".

@jeromecaffaro
Collaborator

Originally on 2011-02-16

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.

@tiborsimko
Owner

Originally on 2011-02-16

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).

@invenio-developers
Collaborator

Originally by valkyrie (@valkyriesavage) on 2011-03-31

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

@invenio-developers
Collaborator

Originally by valkyrie (@valkyriesavage) on 2011-07-07

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.

@invenio-developers
Collaborator

Originally by valkyrie (@valkyriesavage) on 2011-07-07

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.

@jirikuncar jirikuncar added this to the v2.1 milestone
@jirikuncar jirikuncar self-assigned this
@jirikuncar
Owner

Works on master (2.1.dev). @tiborsimko can you confirm that it has been fixed for 1.x?

@jirikuncar jirikuncar removed their assignment
@jirikuncar jirikuncar modified the milestone: v1.x, v2.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.