Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
5.3
-
None
Description
When using prefix in nested facets, not all values are found.
In the following query, I use facet with prefix in both old way (facet.field) and new way (json.facet).
In old way, I get 5 values. In new way I get only 3.
This is the field definition in the schema:
<field name="topics_f" type="string" indexed="true" stored="true" required="false" multiValued="true" />
When I add to the schema docValues="true" the issue is solved.
Query:
http://localhost:8983/solr/mycore/select?q=*%3A*&rows=0&wt=json&indent=true&facet=true&facet.field=topics_f&facet.prefix=2&json.facet={trendFieldFacet:{type:terms,%20field:topics_f,%20%20prefix:%222%22%20}}
Response:
{
"responseHeader": {
"status": 0,
"QTime": 0,
"params": {
"q": ":",
"json.facet": "{trendFieldFacet:{type:terms, field:topics_f, prefix:\"2\" }}",
"facet.field": "topics_f",
"indent": "true",
"facet.prefix": "2",
"rows": "0",
"wt": "json",
"facet": "true",
"_": "1444566142012"
}
},
"response":
,
"facet_counts": {
"facet_queries": {},
"facet_fields":
,
"facet_dates": {},
"facet_ranges": {},
"facet_intervals": {},
"facet_heatmaps": {}
},
"facets": {
"count": 17,
"trendFieldFacet": {
"buckets": [
,
,
{ "val": "2/device/other", "count": 1 } ]
}
}
}