lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: svn commit: r978879 - /lucene/dev/trunk/solr/src/java/org/apache/solr/search/SolrQueryParser.java
Date Sat, 24 Jul 2010 15:30:39 GMT
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: uwe@thetaphi.de


> -----Original Message-----
> From: yonik@apache.org [mailto:yonik@apache.org]
> Sent: Saturday, July 24, 2010 4:39 PM
> To: commits@lucene.apache.org
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message