Hi All,
We have a multi valued field which is docValue enabled , it is declared as
below in the schema
<field name="TAfield1" type="string" indexed="false" multiValued="true"
stored="false" docValues="true"/>
<fieldType name="string" class="solr.StrField" sortMissingLast="true"/>
When we do json facet on this field , we get facet counts ,but when we do
regular facet on the same collection, query does not return any facet counts.
{
"query" : "*:*",
"facet" : {
Description: {
"type" : "terms",
"field" : " TAfield1",
"limit" : 10,
"method" : "enum",
"prefix" : "abr"
}
}
}
Response
{
"responseHeader":{
"zkConnected":true,
"status":0,
"QTime":35668,
"params":{
"json":"\n\n{\n \"query\" : \"*:*\",\n \"facet\" : {\n Description:
{\n \"type\" : \"terms\",\n \"field\" : \"TAfield1\",\n
\"limit\" : 10,\n \"method\" : \"enum\",\n \"prefix\" : \"abr\"\n
}\n\n \n }\n\n}",
"rows":"0"}},
"response":{"numFound":30982475,"start":0,"numFoundExact":true,"docs":[]
},
"facets":{
"count":30982475,
"Description":{
"buckets":[{
"val":"abr",
"count":31},
{
"val":"abraxas",
"count":31},
{
"val":"abri",
"count":24},
{
"val":"abrigos",
"count":19},
{
"val":"abril",
"count":19},
{
"val":"abranchiate",
"count":18},
{
"val":"abrasive",
"count":18},
{
"val":"abreast",
"count":18},
{
"val":"abrege",
"count":18},
{
"val":"abrite",
"count":18}]}}}
This works and returns proper facet counts. But the below query does not return
any facets
https://<host:port/solr/<collection/query?q=*:*&rows=0&facet=true&facet.field=TAfield1&facet.limit=10&facet.prefix=abr&facet.method=enum
Response
{
"responseHeader":{
"zkConnected":true,
"status":0,
"QTime":0,
"params":{
"q":"*:*",
"facet.limit":"10",
"facet.field":"TAfield1",
"facet.prefix":"abr",
"json":"",
"facet.method":"enum",
"rows":"0",
"facet":"true"}},
"response":{"numFound":30982475,"start":0,"numFoundExact":true,"docs":[]
},
"facet_counts":{
"facet_queries":{},
"facet_fields":{
"TAfield1":[]},
"facet_ranges":{},
"facet_intervals":{},
"facet_heatmaps":{}}}
Wondering why the results vary in both cases? . Has anyone encountered this
issue?
Thanks,
Rajeswari