On Jul 20, 2006, at 5:38 PM, Chris Hostetter wrote:
: My application needs the QueryParser (by way of QueryParsing) to be
: set to AND mode, not the default of OR.  There isn't currently a
: setting to control this.

I think by now everyone knows my prediliction for writing custom
RequestHandlers -- but i agree that something like this would be a good idea as a way to modify the properties of the "default" SolrQueryParser.

Just for the record, I'm using QueryParsing.parse() from a custom request handler. I started to use QueryParser directly, but there are several conveniences that QueryParsing offers in terms of analysis and so on.

my one suggestion would be that we should support schema.xml declarations
for all of the "setable" properties of the Lucene QueryParser...

  <solrQueryParser defaultOperator="AND"
                   fuzzyMinSim="0.5"
                   fuzzyPrefixLength="2"
                   locale="???"
                   lowerCaseExpandTerms="true"
                   phraseSlop="5"   />

...i'm not saying I expect Erik to put in all the code to deal with all of those now (unless you really want to Erik), just that it would be a good
idea if the config syntax for the default OP left room for them as
children of a larger solrQueryParser config block.

My biggest problem with going the extra mile for these types of changes is that I simply don't have the time to do these types of things right with unit tests, documentation, and so on. I'm especially amazed at the complexity and configurability that has gone into the highlighting contribution (thanks!!!).

Given the needs of Solr to accommodate all of this flexibility, I'll likely just hack this AND change into my project and have to leave the Solr'ification of it to others.

        Erik



Reply via email to