Thanks, Aloke. Prefix solves this problem partially but wanted to see if we have solution which works all the time. For e.g. if we search for "Ronald Wagner" and in multivalues fields we will get result like below and I really want to get only the values facets are "Wagner, Ronald S MD ", "Wagner Enterprise Ronald"
"docs": [ { "dname": [ "Oracle Radiology of NV", "Wagner, Ronald S MD ", ] , "dname": [ "Wagner Enterprise Ronald", "Gery Levy", ] Any help/suggestion on this? -----Original Message----- From: Aloke Ghoshal [mailto:alghos...@gmail.com] Sent: Monday, November 04, 2013 1:09 AM To: solr-user@lucene.apache.org Subject: Re: Facet question: Getting only the matched value from multivalued field Hi Susheel, You might be able to pull something off using facet.prefix: http://wiki.apache.org/solr/SimpleFacetParameters#facet.prefix. Will work when the prefix is exact and doesn't require any analysis, something along these lines: http://solr.pl/en/2013/03/25/autocomplete-on-multivalued-fields-using-faceting/ Regards, Aloke On Mon, Nov 4, 2013 at 10:44 AM, Susheel Kumar < susheel.ku...@thedigitalgroup.net> wrote: > Hello, > > We have one multivalued field called "dname". When user search for any > of the name like "160 Associates LLC", we are able to get facet, but > we only want values which matches the search query. Is there any way? > > For e.g. assuming below doc, I want to get facet results for only > first value "160 WATER ASSOCIATES LLC" which produced hit not all 3. > ----- > > "dname": [ > "160 WATER ASSOCIATES LLC", > "McDonald", > "Office of Mcdowel Attorney" > ] > > > Thanks in advance and appreciate your help. > > Thanks, > Susheel > > > >