You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by eh...@apache.org on 2008/07/10 20:43:34 UTC

svn commit: r675673 - /lucene/solr/trunk/src/java/org/apache/solr/util/SolrPluginUtils.java

Author: ehatcher
Date: Thu Jul 10 11:43:34 2008
New Revision: 675673

URL: http://svn.apache.org/viewvc?rev=675673&view=rev
Log:
Fix parseQueryStrings to use extensible parsing syntax, not just SolrQueryParser.  This function is currently only used by the MoreLikeThis handler.

Modified:
    lucene/solr/trunk/src/java/org/apache/solr/util/SolrPluginUtils.java

Modified: lucene/solr/trunk/src/java/org/apache/solr/util/SolrPluginUtils.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/util/SolrPluginUtils.java?rev=675673&r1=675672&r2=675673&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/util/SolrPluginUtils.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/util/SolrPluginUtils.java Thu Jul 10 11:43:34 2008
@@ -827,15 +827,9 @@
                                               String[] queries) throws ParseException {    
     if (null == queries || 0 == queries.length) return null;
     List<Query> out = new LinkedList<Query>();
-    SolrIndexSearcher s = req.getSearcher();
-    /* Ignore SolrParams.DF - could have init param FQs assuming the
-     * schema default with query param DF intented to only affect Q.
-     * If user doesn't want schema default, they should be explicit in the FQ.
-     */
-    SolrQueryParser qp = new SolrQueryParser(s.getSchema(), null);
     for (String q : queries) {
       if (null != q && 0 != q.trim().length()) {
-        out.add(qp.parse(q));
+        out.add(QParser.getParser(q, null, req).getQuery());
       }
     }
     return out;