mirror of https://github.com/apache/lucene.git
allow _version_ to use DocValues
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1561851 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a193836b86
commit
f15097b4e2
|
@ -158,6 +158,9 @@ New Features
|
||||||
automatically for an RPT field type. See Spatial4j CHANGES & javadocs.
|
automatically for an RPT field type. See Spatial4j CHANGES & javadocs.
|
||||||
https://github.com/spatial4j/spatial4j/blob/master/CHANGES.md (David Smiley)
|
https://github.com/spatial4j/spatial4j/blob/master/CHANGES.md (David Smiley)
|
||||||
|
|
||||||
|
* SOLR-5670: allow _version_ to use DocValues. (Per Steffensen via yonik)
|
||||||
|
|
||||||
|
|
||||||
Bug Fixes
|
Bug Fixes
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class VersionInfo {
|
||||||
*/
|
*/
|
||||||
public static SchemaField getAndCheckVersionField(IndexSchema schema)
|
public static SchemaField getAndCheckVersionField(IndexSchema schema)
|
||||||
throws SolrException {
|
throws SolrException {
|
||||||
final String errPrefix = VERSION_FIELD + " field must exist in schema, using indexed=\"true\" stored=\"true\" and multiValued=\"false\"";
|
final String errPrefix = VERSION_FIELD + " field must exist in schema, using indexed=\"true\" or docValues=\"true\", stored=\"true\" and multiValued=\"false\"";
|
||||||
SchemaField sf = schema.getFieldOrNull(VERSION_FIELD);
|
SchemaField sf = schema.getFieldOrNull(VERSION_FIELD);
|
||||||
|
|
||||||
if (null == sf) {
|
if (null == sf) {
|
||||||
|
@ -57,10 +57,10 @@ public class VersionInfo {
|
||||||
(SolrException.ErrorCode.SERVER_ERROR,
|
(SolrException.ErrorCode.SERVER_ERROR,
|
||||||
errPrefix + " (" + VERSION_FIELD + " does not exist)");
|
errPrefix + " (" + VERSION_FIELD + " does not exist)");
|
||||||
}
|
}
|
||||||
if ( !sf.indexed() ) {
|
if ( !sf.indexed() && !sf.hasDocValues()) {
|
||||||
throw new SolrException
|
throw new SolrException
|
||||||
(SolrException.ErrorCode.SERVER_ERROR,
|
(SolrException.ErrorCode.SERVER_ERROR,
|
||||||
errPrefix + " (" + VERSION_FIELD + " is not indexed");
|
errPrefix + " (" + VERSION_FIELD + " must be either indexed or have docValues");
|
||||||
}
|
}
|
||||||
if ( !sf.stored() ) {
|
if ( !sf.stored() ) {
|
||||||
throw new SolrException
|
throw new SolrException
|
||||||
|
|
Loading…
Reference in New Issue