Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
5.1, 5.2
-
None
-
None
-
OS X 10.10.3
$ java -version
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
Description
When using the JSON API, faceting on an EnumField or TrieIntField returns an empty list of buckets.
Steps to reproduce:
1. Define an EnumField.
schema.xml:
<field name="kingdom" type="kingdomEnum" indexed="true" stored="true" required="true" />
<fieldType name="kingdomEnum" class="solr.EnumField" enumsConfig="enumsConfig.xml" enumName="kingdom"/>
enumsConfig.xml:
<?xml version="1.0" ?>
<enumsConfig>
<enum name="kingdom">
<value>plants</value>
<value>metazoa</value>
<value>fungi</value>
</enum>
</enumsConfig>
2. Add documents to core.
3. Faceting over the EnumField returns an empty list of buckets:
$ curl http://localhost:8983/solr/myCore/query -d '
{
query: ":",
facet : {
kingdom :
}
}'
{ ...
"facets":{
"count":17,
"kingdom":
}}
The same issue happens with TrieIntField. Using old-style facets works, this only happens with the new JSON API.
I tested changing the field to a string and I get the expected results.
Attachments
Issue Links
- duplicates
-
SOLR-7496 Empty buckets when faceting with JSON API over EnumField and TrieIntField
- Open