Hi Evans, Thanks for your reply.
I would like to show both the ItemId and the ItemName together in the same JSON output bucket. Currently I'm only able to show one of them in one bucket. If I want to show both, it will be show in 2 buckets, like the one below, which will probably cause the output to double in size. "facets":{ "count":1, "itemNo":{ "buckets":[{ "val":"1111", "count":3591}]}, "itemName":{ "buckets":[{ "val":"item1111", "count":3591}]} I'm using Solr 6.2.1. Regards, Edwin On 18 January 2017 at 00:15, Tom Evans <tevans...@googlemail.com> wrote: > On Mon, Jan 16, 2017 at 2:58 PM, Zheng Lin Edwin Yeo > <edwinye...@gmail.com> wrote: > > Hi, > > > > I have been using JSON Facet, but I am facing some constraints in > > displaying the field. > > > > For example, I have 2 fields, itemId and itemName. However, when I do the > > JSON Facet, I can only get it to show one of them in the output, and I > > could not get it to show both together. > > I will like to show both the ID and Name together, so that it will be > more > > meaningful and easier for user to understand, without having to refer to > > another table to determine the match between the ID and Name. > > I don't understand what you mean. If you have these three documents in > your index, what data do you want in the facet? > > [ > {itemId: 1, itemName: "Apple"}, > {itemId: 2, itemName: "Android"}, > {itemId: 3, itemName: "Android"}, > ] > > Cheers > > Tom >