Yosi Nesher created SOLR-8155: --------------------------------- Summary: json.facet - prefix parameter doesn't work properly Key: SOLR-8155 URL: https://issues.apache.org/jira/browse/SOLR-8155 Project: Solr Issue Type: Bug Components: Facet Module Affects Versions: 5.3 Reporter: Yosi Nesher
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": { "numFound": 17, "start": 0, "docs": [] }, "facet_counts": { "facet_queries": {}, "facet_fields": { "topics_f": [ "2/device/iphone", 4, "2/device/samsung", 4, "2/city/london", 1, "2/city/rome", 1, "2/device/other", 1 ] }, "facet_dates": {}, "facet_ranges": {}, "facet_intervals": {}, "facet_heatmaps": {} }, "facets": { "count": 17, "trendFieldFacet": { "buckets": [ { "val": "2/device/iphone", "count": 4 }, { "val": "2/device/samsung", "count": 4 }, { "val": "2/device/other", "count": 1 } ] } } } -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org