You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alfonso Muñoz-Pomer Fuentes (JIRA)" <ji...@apache.org> on 2015/05/01 19:24:06 UTC
[jira] [Created] (SOLR-7497) Empty buckets when faceting with JSON
API on EnumField or TrieIntField
Alfonso Muñoz-Pomer Fuentes created SOLR-7497:
-------------------------------------------------
Summary: Empty buckets when faceting with JSON API on EnumField or TrieIntField
Key: SOLR-7497
URL: https://issues.apache.org/jira/browse/SOLR-7497
Project: Solr
Issue Type: Bug
Components: faceting
Affects Versions: 5.1, 5.2
Environment: 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)
Reporter: Alfonso Muñoz-Pomer Fuentes
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 : {terms : kingdom}
}
}'
{ ...
"facets":{
"count":17,
"kingdom":{
"buckets":[]}}}
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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org