I'm using dismax with the default operator set to AND, and don't use
Minimum Match (commented out in solrconfig.xml), meaning 100% of the
terms must match. Then in my application logic I use a regex that
checks if the query contains OR , and if it does I add mm=1 to the
solr request to effectively turn the query into an OR. This trick
doesn't work for complex boolean queries but works for simple xxx OR
yyy.
-Original Message-
From: Chris Hostetter [mailto:hossman_luc...@fucit.org]
Sent: 18/03/2009 10:45 AM
To: solr-user@lucene.apache.org
Subject: Re: Operators and Minimum Match with Dismax handler
: I have an index which we are setting the default operator to AND.
: Am I right in saying that using the dismax handler, the default
operator in
: the schema file is effectively ignored? (This is the conclusion I've
made
: from testing myself)
correct.
: The issue I have with this, is that if I want to include an OR in my
phrase,
: these are effectively getting ignored. The parser is still trying to
match
: 100% of the search terms
:
: e.g. 'lucene OR query' still only finds matches for 'lucene AND query'
: the parsed query is: +(((drug_name:lucen) (drug_name:queri))~2) ()
correct. dismax isn't designed to be used that way (it's a fluke of
the implementation that using AND works at all)
: Does anyone have any advise as to how I could deal with this kkind of
: problem?
i would set your mm to something smaller and let your users use + when
they want to make something required. if you really want to support the
AND/OR/NOT type sequence ... don't use dismax: that type of syntax is
what the standard parser is for.
-Hoss
CLSA CLEAN GREEN: Please consider our environment before printing this email.
The content of this communication is subject to CLSA Legal and Regulatory
Notices.
These can be viewed at https://www.clsa.com/disclaimer.html or sent to you upon
request.