You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ds...@apache.org on 2012/06/22 04:43:17 UTC
svn commit: r1352761 - in /lucene/dev/branches/branch_4x: ./ solr/
solr/contrib/ solr/contrib/clustering/src/test-files/clustering/solr/conf/
solr/contrib/uima/src/test-files/uima/
solr/contrib/uima/src/test-files/uima/solr/conf/ solr/core/ solr/core/s...
Author: dsmiley
Date: Fri Jun 22 02:43:15 2012
New Revision: 1352761
URL: http://svn.apache.org/viewvc?rev=1352761&view=rev
Log:
SOLR-3313 Rename Query Type to Query Parser
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/solr/ (props changed)
lucene/dev/branches/branch_4x/solr/contrib/ (props changed)
lucene/dev/branches/branch_4x/solr/contrib/clustering/src/test-files/clustering/solr/conf/solrconfig.xml
lucene/dev/branches/branch_4x/solr/contrib/uima/src/test-files/uima/solr/conf/solrconfig.xml
lucene/dev/branches/branch_4x/solr/contrib/uima/src/test-files/uima/uima-tokenizers-solrconfig.xml
lucene/dev/branches/branch_4x/solr/core/ (props changed)
lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/core/SolrCore.java
lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/search/QParser.java
lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/search/QueryParsing.java
lucene/dev/branches/branch_4x/solr/example/ (props changed)
lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/mail/conf/solrconfig.xml
Modified: lucene/dev/branches/branch_4x/solr/contrib/clustering/src/test-files/clustering/solr/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/contrib/clustering/src/test-files/clustering/solr/conf/solrconfig.xml?rev=1352761&r1=1352760&r2=1352761&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/contrib/clustering/src/test-files/clustering/solr/conf/solrconfig.xml (original)
+++ lucene/dev/branches/branch_4x/solr/contrib/clustering/src/test-files/clustering/solr/conf/solrconfig.xml Fri Jun 22 02:43:15 2012
@@ -305,7 +305,7 @@
<!-- DisMaxRequestHandler allows easy searching across multiple fields
for simple user-entered phrases. It's implementation is now
- just the standard SearchHandler with a default query type
+ just the standard SearchHandler with a default query parser
of "dismax".
see http://wiki.apache.org/solr/DisMaxRequestHandler
-->
Modified: lucene/dev/branches/branch_4x/solr/contrib/uima/src/test-files/uima/solr/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/contrib/uima/src/test-files/uima/solr/conf/solrconfig.xml?rev=1352761&r1=1352760&r2=1352761&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/contrib/uima/src/test-files/uima/solr/conf/solrconfig.xml (original)
+++ lucene/dev/branches/branch_4x/solr/contrib/uima/src/test-files/uima/solr/conf/solrconfig.xml Fri Jun 22 02:43:15 2012
@@ -400,7 +400,7 @@
<!--
DisMaxRequestHandler allows easy searching across multiple fields
for simple user-entered phrases. It's implementation is now just the
- standard SearchHandler with a default query type of "dismax". see
+ standard SearchHandler with a default query parser of "dismax". see
http://wiki.apache.org/solr/DisMaxRequestHandler
-->
<requestHandler name="dismax" class="solr.SearchHandler">
Modified: lucene/dev/branches/branch_4x/solr/contrib/uima/src/test-files/uima/uima-tokenizers-solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/contrib/uima/src/test-files/uima/uima-tokenizers-solrconfig.xml?rev=1352761&r1=1352760&r2=1352761&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/contrib/uima/src/test-files/uima/uima-tokenizers-solrconfig.xml (original)
+++ lucene/dev/branches/branch_4x/solr/contrib/uima/src/test-files/uima/uima-tokenizers-solrconfig.xml Fri Jun 22 02:43:15 2012
@@ -400,7 +400,7 @@
<!--
DisMaxRequestHandler allows easy searching across multiple fields
for simple user-entered phrases. It's implementation is now just the
- standard SearchHandler with a default query type of "dismax". see
+ standard SearchHandler with a default query parser of "dismax". see
http://wiki.apache.org/solr/DisMaxRequestHandler
-->
<requestHandler name="dismax" class="solr.SearchHandler">
Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/core/SolrCore.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/core/SolrCore.java?rev=1352761&r1=1352760&r2=1352761&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/core/SolrCore.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/core/SolrCore.java Fri Jun 22 02:43:15 2012
@@ -1753,7 +1753,7 @@ public final class SolrCore implements S
public QParserPlugin getQueryPlugin(String parserName) {
QParserPlugin plugin = qParserPlugins.get(parserName);
if (plugin != null) return plugin;
- throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Unknown query type '"+parserName+"'");
+ throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Unknown query parser '"+parserName+"'");
}
private final HashMap<String, ValueSourceParser> valueSourceParsers = new HashMap<String, ValueSourceParser>();
Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/search/QParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/search/QParser.java?rev=1352761&r1=1352760&r2=1352761&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/search/QParser.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/search/QParser.java Fri Jun 22 02:43:15 2012
@@ -300,15 +300,15 @@ public abstract class QParser {
}
/** Create a <code>QParser</code> to parse <code>qstr</code>,
- * assuming that the default query type is <code>defaultType</code>.
- * The query type may be overridden by local parameters in the query
- * string itself. For example if defaultType=<code>"dismax"</code>
+ * assuming that the default query parser is <code>defaultParser</code>.
+ * The query parser may be overridden by local parameters in the query
+ * string itself. For example if defaultParser=<code>"dismax"</code>
* and qstr=<code>foo</code>, then the dismax query parser will be used
* to parse and construct the query object. However
* if qstr=<code>{!prefix f=myfield}foo</code>
* then the prefix query parser will be used.
*/
- public static QParser getParser(String qstr, String defaultType, SolrQueryRequest req) throws ParseException {
+ public static QParser getParser(String qstr, String defaultParser, SolrQueryRequest req) throws ParseException {
// SolrParams localParams = QueryParsing.getLocalParams(qstr, req.getParams());
String stringIncludingLocalParams = qstr;
@@ -335,18 +335,18 @@ public abstract class QParser {
}
- String type;
+ String parserName;
if (localParams == null) {
- type = defaultType;
+ parserName = defaultParser;
} else {
- type = localParams.get(QueryParsing.TYPE,defaultType);
+ parserName = localParams.get(QueryParsing.TYPE,defaultParser);
qstr = localParams.get("v");
}
- type = type==null ? QParserPlugin.DEFAULT_QTYPE : type;
+ parserName = parserName==null ? QParserPlugin.DEFAULT_QTYPE : parserName;
- QParserPlugin qplug = req.getCore().getQueryPlugin(type);
+ QParserPlugin qplug = req.getCore().getQueryPlugin(parserName);
QParser parser = qplug.createParser(qstr, localParams, req.getParams(), req);
parser.stringIncludingLocalParams = stringIncludingLocalParams;
Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/search/QueryParsing.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/search/QueryParsing.java?rev=1352761&r1=1352760&r2=1352761&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/search/QueryParsing.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/search/QueryParsing.java Fri Jun 22 02:43:15 2012
@@ -58,8 +58,8 @@ public class QueryParsing {
public static final String OP = "q.op"; // the SolrParam used to override the QueryParser "default operator"
public static final String V = "v"; // value of this parameter
public static final String F = "f"; // field that a query or command pertains to
- public static final String TYPE = "type";// type of this query or command
- public static final String DEFTYPE = "defType"; // default type for any direct subqueries
+ public static final String TYPE = "type";// parser for this query or command
+ public static final String DEFTYPE = "defType"; // default parser for any direct subqueries
public static final String LOCALPARAM_START = "{!";
public static final char LOCALPARAM_END = '}';
public static final String DOCID = "_docid_";
Modified: lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/mail/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/mail/conf/solrconfig.xml?rev=1352761&r1=1352760&r2=1352761&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/mail/conf/solrconfig.xml (original)
+++ lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/mail/conf/solrconfig.xml Fri Jun 22 02:43:15 2012
@@ -324,7 +324,7 @@
<!-- DisMaxRequestHandler allows easy searching across multiple fields
for simple user-entered phrases. It's implementation is now
- just the standard SearchHandler with a default query type
+ just the standard SearchHandler with a default query parser
of "dismax".
see http://wiki.apache.org/solr/DisMaxRequestHandler
-->