This is unsupported at the moment and the devs ara aware of the issue.
https://issues.apache.org/jira/browse/SOLR-7497
On 01/05/2015 16:53, Alfonso Muñoz-Pomer Fuentes wrote:
I forgot to add my "kingdomEnum" definition in schema.xml:
<fieldType name="kingdomEnum" class="solr.EnumField"
enumsConfig="enumsConfig.xml" enumName="kingdom"/>
On 01/05/2015 16:38, Alfonso Muñoz-Pomer Fuentes wrote:
Hi,
I’m having problems when faceting over an EnumField such as this:
<field name="kingdom" type="kingdomEnum" indexed="true" stored="true"
required="true" />
And in enumsConfig.xml:
<?xml version="1.0" ?>
<enumsConfig>
<enum name="kingdom">
<value>plants</value>
<value>metazoa</value>
<value>fungi</value>
</enum>
</enumsConfig>
A query such as the one below returns all buckets empty:
curl http://localhost:8983/solr/enumTest/query -d '
{
query: "*:*",
facet : {
kingdom : {terms : kingdom}
}
}'
{...
"facets":{
"count":17,
"kingdom":{
"buckets":[]}}}
If I turn the kingdom field to be a string, then faceting works as
expected. The same happens with TrieIntField (aggregating functions like
avg work but unique doesn’t). This worked in Heliosearch. Has anybody
had any similar problems? Am I missing something?
Thank you in advance.
Alfonso