[ https://issues.apache.org/jira/browse/SOLR-8155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yonik Seeley updated SOLR-8155: ------------------------------- Attachment: SOLR-8155.patch OK, so there was a bug in the generic accumulation code used when there was a facet prefix or when a bucket sort other than count was used. This patch fixes the bug and re-enables facet.prefix when facet.method=uif (SOLR-8466) and enables the test code for that as well. > 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 > Assignee: Yonik Seeley > Fix For: 6.0 > > Attachments: SOLR-8155.patch, SOLR-8155.patch > > > 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