I dont think we should do any of this. but if you are going to do it (which clearly you will regardless of anyone elses opinion), set the default version to LUCENE_24 in *SOLRCONFIG.XML* so that people who want to use the 3.1 defaults can, dont hardcode versions or options.
On Sat, Jul 24, 2010 at 11:30 AM, Uwe Schindler <[email protected]> wrote: > Hi Yonik, > > i would prefer to pass the default QP version constant tot he ctor and > simply switch on the auto-phrase building per default: > > super(schema.getSolrConfig().getLuceneVersion("luceneMatchVersion", > Version.LUCENE_24), defaultField == null ? > schema.getDefaultSearchFieldName() : defaultField, > schema.getQueryAnalyzer()); > setAutoGeneratePhraseQueries(true); > > This is cleaner, as there may (an I think there are other things changed > dependent on version?) > > Uwe > > ----- > Uwe Schindler > H.-H.-Meier-Allee 63, D-28213 Bremen > http://www.thetaphi.de > eMail: [email protected] > > > > -----Original Message----- > > From: [email protected] [mailto:[email protected]] > > Sent: Saturday, July 24, 2010 4:39 PM > > To: [email protected] > > Subject: svn commit: r978879 - > > /lucene/dev/trunk/solr/src/java/org/apache/solr/search/SolrQueryParser.ja > > va > > > > Author: yonik > > Date: Sat Jul 24 14:38:58 2010 > > New Revision: 978879 > > > > URL: http://svn.apache.org/viewvc?rev=978879&view=rev > > Log: > > LUCENE-2458: keep Solr's default QP behavior wrt compound words and > > phrases > > > > Modified: > > > > lucene/dev/trunk/solr/src/java/org/apache/solr/search/SolrQueryParser.jav > > a > > > > Modified: > > lucene/dev/trunk/solr/src/java/org/apache/solr/search/SolrQueryParser.jav > > a > > URL: > > http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/java/org/apache/s > > olr/search/SolrQueryParser.java?rev=978879&r1=978878&r2=978879&view= > > diff > > ========================================================== > > ==================== > > --- > > lucene/dev/trunk/solr/src/java/org/apache/solr/search/SolrQueryParser.jav > > a (original) > > +++ > > lucene/dev/trunk/solr/src/java/org/apache/solr/search/SolrQueryParser.jav > > a Sat Jul 24 14:38:58 2010 > > @@ -73,7 +73,7 @@ public class SolrQueryParser extends Que > > * @see IndexSchema#getDefaultSearchFieldName() > > */ > > public SolrQueryParser(IndexSchema schema, String defaultField) { > > - super(schema.getSolrConfig().getLuceneVersion("luceneMatchVersion", > > Version.LUCENE_24), defaultField == null ? > > schema.getDefaultSearchFieldName() : defaultField, > > schema.getQueryAnalyzer()); > > + super(Version.LUCENE_24, defaultField == null ? > > schema.getDefaultSearchFieldName() : defaultField, > > schema.getQueryAnalyzer()); > > this.schema = schema; > > this.parser = null; > > this.defaultField = defaultField; > > @@ -87,7 +87,7 @@ public class SolrQueryParser extends Que > > } > > > > public SolrQueryParser(QParser parser, String defaultField, Analyzer > > analyzer) { > > - > > super(parser.getReq().getSchema().getSolrConfig().getLuceneVersion("luce > > neMatchVersion", Version.LUCENE_24), defaultField, analyzer); > > + super(Version.LUCENE_24, defaultField, analyzer); > > this.schema = parser.getReq().getSchema(); > > this.parser = parser; > > this.defaultField = defaultField; > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Robert Muir [email protected]
