: I would also like to follow your advice but don't know how to do it with
: defaultOperator="AND". What I am missing is the equivalent to OR:
: AND: +
: NOT: -
: OR: ???
: I didn't find anything on the Solr or Lucene query syntax pages. If

that's true, regretably there is no prefix operator to indicate a "SHOULD" 
clause in the Lucene query langauge, so if you set the default op to "AND" 
you can't then override it on individual clauses.

this is one of hte reasons i never make the default op AND.

If i'm dealing with structured queries generated progromaticly or by 
"advanced" users (ie: people who know they are querying Solr) i leave the 
default op alone an let them specify the full syntax with total control.  
if i'm dealing with "novice" users who just want to search for stuff i use 
dismax with it's shinny sexy "mm" param (disclaimer: i wrote it) and the 
default op doesn't matter (even if i want to make every term a user types 
mandatory)

: I switched to the AND-default because that is the default in my web
: frontend so I don't have to change logic. What should I do in this
: situation? Go back to the OR-default?

it depends on what exactly your goals are ... you could always leave the 
defualt OR in the schema but have your front end send q.op when needed -- 
or set q.op as a default in a handler only used by your front end while 
other queries use handlers without it (and get the default behavior) ...

...or you could just ignore the ramblings of a crazy person 
like me who thinks AND and OR are abominations in a non-boolean logic 
system since they make sense for you and go about your day.

i'm sure your food will still taste pretty good :)




-Hoss

Reply via email to