We have a somewhat similar case; what we will do is to have one analysed
field in conjunction with a string field (possibly with case folding). That
way, we can use the original field values for displaying as facets, but
also allow searches for parts of the facet values.


On Tue, Nov 5, 2013 at 1:27 PM, Erick Erickson <erickerick...@gmail.com>wrote:

> There's no good way to do that that I know of. The problem is
> that faceting occurs at an individual token level. If you use an
> un-analyzed field, then you get facets that are the entire value,
> but then you don't match non-exact, i.e. the "Ronald Wagner"
> would not match "Wagner, Ronald S MD".
>
> I don't see a good way to do what you want offhand.
>
> Sorry I can't be more helpful,
> Erick
>
>
> On Mon, Nov 4, 2013 at 5:27 PM, Susheel Kumar <
> susheel.ku...@thedigitalgroup.net> wrote:
>
> > 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
> > >
> > >
> > >
> > >
> >
>

Reply via email to