Skip to content


Subversion checkout URL

You can clone with
Download ZIP


WebSearch: improve/fix "NOT" operator #495

jeromecaffaro opened this Issue · 6 comments

4 participants


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


Originally on 2011-02-16

Note that the same query can work in "advanced search" mode:

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.


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


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


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.


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

Works on master ( @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.