So are you saying that for all results for "cardiologist",
you don't want facets not matching "Cardiologist" to be
returned as facets?

what happens when you make q=specialities:Cardiologist?
instead of just q=Cardiologist?

Seems that if you make the query on the field, then all
your results will necessarily qualify and you can discard
any additional facets you don't want (e.g. that don't
match the initial query term).

Maybe you can write what you see now, with what you
want to help clarify.

On 06/21/2011 09:47 PM, Bill Bell wrote:
I have a field: specialties that is multiValued.

It indicates the doctor's specialties: cardiologist, internist, etc.

When someone does a search: "Cardiologist", I use
q=cardiologist&defType=dismax&qf=specialties&facet=true&facet.field=specialt
ies

What I want to come out in the facet is the Cardiologist (since it matches
exactly) and the number that matches: 700.
I don't want to see the other values that are not Cardiologist.

Now I see:

Cardiologist: 700
Internist: 45
Family Doctor: 20

This means that several Cardiologist's are also internists and family
doctors. When it matches exactly, I don't want to see Internists, Family
Doctors. How do I send a query to Solr with a condition.
Facet.query=specialties:Cardiologist&facet.field=specialties

Then if the query returns something use it, otherwise use the field one?

Other ideas?





Reply via email to