From aaa638d1880db943b3d2dd259ddd30cea3047683 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Thu, 8 Oct 2009 15:15:50 +0000 Subject: [PATCH] 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 --- src/java/org/apache/solr/search/QueryParsing.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/java/org/apache/solr/search/QueryParsing.java b/src/java/org/apache/solr/search/QueryParsing.java index f58ad020ae9..35d6e6ed28b 100644 --- a/src/java/org/apache/solr/search/QueryParsing.java +++ b/src/java/org/apache/solr/search/QueryParsing.java @@ -45,14 +45,14 @@ import java.util.regex.Pattern; * @version $Id$ */ public class QueryParsing { - /** the SolrParam used to override the QueryParser "default operator" */ - public static final String OP = "q.op"; + 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 LOCALPARAM_START = "{!"; public static final char LOCALPARAM_END = '}'; + public static final String DOCID = "_docid_"; /** * Helper utility for parsing a query using the Lucene QueryParser syntax. @@ -266,7 +266,7 @@ public class QueryParsing { else { 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); } else {