Skip to content

Instantly share code, notes, and snippets.

@billdueber
Created May 24, 2010 19:48
Show Gist options
  • Save billdueber/412341 to your computer and use it in GitHub Desktop.
Save billdueber/412341 to your computer and use it in GitHub Desktop.
Just a quick place to put this that's better than IRC:
Suppose mm="<2 -1"
As implemented now, the search
dog cat =>
dog AND cat
Likewise
dog cat -mouse =>
(dog AND cat) OR (dog AND NOT mouse) or (cat AND NOT mouse) OR (dog AND cat AND NOT mouse)
Which I understand -- dismax is treating '-mouse' as a term in its own right and doing what
it's supposed to do according to the mm setting.
I just think that behavior is unexpected by most searchers.
My expectation as a searcher would be that
anyRandomSearch
...would be a (probably proper) superset of
anyRandomSearch -someTerm
That is, if I do a search, and add a '-someTerm' to it, I'll end up with fewer results.
So, in this example, I would expect
dog cat mouse =>
(dog AND cat) AND NOT mouse
The question is whether or not my expectations (and, I should add, those of all the
folks in the library around me) is out of whack.
It also appears that
cat mouse +dueber
devolves to just "+dueber"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment