mirror of https://github.com/apache/lucene.git
SOLR-1478: use _docid_ to sort by the lucene docid
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@823199 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
454d21428e
commit
aaa638d188
|
@ -45,14 +45,14 @@ import java.util.regex.Pattern;
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public class QueryParsing {
|
public class QueryParsing {
|
||||||
/** the SolrParam used to override the QueryParser "default operator" */
|
public static final String OP = "q.op"; // the SolrParam used to override the QueryParser "default operator"
|
||||||
public static final String OP = "q.op";
|
|
||||||
public static final String V = "v"; // value of this parameter
|
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 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 TYPE = "type";// type of this query or command
|
||||||
public static final String DEFTYPE = "defType"; // default type for any direct subqueries
|
public static final String DEFTYPE = "defType"; // default type for any direct subqueries
|
||||||
public static final String LOCALPARAM_START = "{!";
|
public static final String LOCALPARAM_START = "{!";
|
||||||
public static final char LOCALPARAM_END = '}';
|
public static final char LOCALPARAM_END = '}';
|
||||||
|
public static final String DOCID = "_docid_";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper utility for parsing a query using the Lucene QueryParser syntax.
|
* Helper utility for parsing a query using the Lucene QueryParser syntax.
|
||||||
|
@ -266,7 +266,7 @@ public class QueryParsing {
|
||||||
else {
|
else {
|
||||||
lst[i] = new SortField(null, SortField.SCORE, true);
|
lst[i] = new SortField(null, SortField.SCORE, true);
|
||||||
}
|
}
|
||||||
} else if ("#".equals(part)) {
|
} else if (DOCID.equals(part)) {
|
||||||
lst[i] = new SortField(null, SortField.DOC, top);
|
lst[i] = new SortField(null, SortField.DOC, top);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue