mirror of https://github.com/apache/lucene.git
SOLR-10155: For numeric types facet.contains= and facet.prefix= are now rejected.
(Gus Heck, Christine Poerschke)
This commit is contained in:
parent
da113fde77
commit
43474312eb
|
@ -271,6 +271,8 @@ Other Changes
|
|||
|
||||
* SOLR-10219: re-enable HDFS tests under JDK9 (hossman, Uwe Schindler)
|
||||
|
||||
* SOLR-10155: For numeric types facet.contains= and facet.prefix= are now rejected.
|
||||
(Gus Heck, Christine Poerschke)
|
||||
|
||||
================== 6.4.2 ==================
|
||||
|
||||
|
|
|
@ -484,15 +484,13 @@ public class SimpleFacets {
|
|||
case FCS:
|
||||
assert ft.isPointField() || !multiToken;
|
||||
if (ft.isPointField() || (ft.getNumberType() != null && !sf.multiValued())) {
|
||||
// force numeric faceting
|
||||
if (prefix != null && !prefix.isEmpty()) {
|
||||
if (prefix != null) {
|
||||
throw new SolrException(ErrorCode.BAD_REQUEST, FacetParams.FACET_PREFIX + " is not supported on numeric types");
|
||||
}
|
||||
if (termFilter != null) {
|
||||
final boolean supportedOperation = (termFilter instanceof SubstringBytesRefFilter) && ((SubstringBytesRefFilter) termFilter).substring().isEmpty();
|
||||
if (!supportedOperation) {
|
||||
throw new SolrException(ErrorCode.BAD_REQUEST, FacetParams.FACET_CONTAINS + " is not supported on numeric types");
|
||||
}
|
||||
throw new SolrException(ErrorCode.BAD_REQUEST, "BytesRef term filters ("
|
||||
+ FacetParams.FACET_CONTAINS + ", "
|
||||
+ FacetParams.FACET_EXCLUDETERMS + ") are not supported on numeric types");
|
||||
}
|
||||
// We should do this, but mincount=0 is currently the default
|
||||
// if (ft.isPointField() && mincount <= 0) {
|
||||
|
|
Loading…
Reference in New Issue