Hi Bill,

as far as I understood now, with the help of my friend, you can't.
Multivalued fields don't work that way.
You can however always filter the facet results manually in the JSP. You
knwo what the user chose as a facet.

The issue I ran into is when you have additional facet fields. For example
when you also have country as a facetfield. Now when you search for
Cardiologist, it also returns Internist and family doctor as you described.
What Sorl now also returns for the country list are the countries for
Cardiologist, but also for Internist  and family doctor. This is not what
you want.

I don't think what we want her is supported out of the box by solr.


Regards,
Dennis


On Wed, Jun 22, 2011 at 9:49 AM, Bill Bell <billnb...@gmail.com> wrote:

> You can type q=cardiology and match on cardiologist. If stemming did not
> work you can just add a synonym:
>
> cardiology,cardiologist
>
> But that is not the issue. The issue is around multiValue fields and
> facets. You would expect a user
> Who is searching on the multiValued field to match on some values in
> there. For example,
> they type "Cardiologist" and it matches on the value "Cardiologist". So it
> matches "in the multiValue field".
> So that part works. Then when I output the facet, I need a different
> behavior than the default. I need
> The facet to only output the value that matches (scored) - NOT ALL VALUES
> in the multiValued field.
>
> I think it makes sense?
>
>
> On 6/22/11 1:42 AM, "Michael Kuhlmann" <s...@kuli.org> wrote:
>
> >Am 22.06.2011 05:37, schrieb Bill Bell:
> >> It can get more complicated. Here is another example:
> >>
> >> q=cardiology&defType=dismax&qf=specialties
> >>
> >>
> >> (Cardiology and cardiologist are stems)...
> >>
> >> But I don't really know which value in Cardiologist match perfectly.
> >>
> >> Again, I only want it to return:
> >>
> >> Cardiologist: 3
> >
> >You would never get "Cardiologist: 3" as the facet result, because if
> >"Cardiologist" would be in your index, it's impossible to find it when
> >searching for "cardiology" (except when you manage to write some strange
> >tokenizer that translates "cardiology" to "Cardiologist" on query time,
> >including the upper case letter).
> >
> >Facets are always taken from the index, so they usually match exactly or
> >never when querying for it.
> >
> >-Kuli
>
>
>

Reply via email to