tags:

views:

53

answers:

1

Consider we have a database of US people in Solr. We've 20 persons who are interested to find either Mans or Womans in the database. Besides that those 20 persons are distributed among US and are willing to find only people in their cities. We're doing Solr query: q=gender:Man&fq=location:'New York' for example. Highlighting is ON on all fields. People will see only gender highlighted, but they would be really happier if they can se also the location field highlighted. Is there any simple way to do that? For speed optimization must run filter query. This is a must.

A: 

I don't think so. But you could alwasy implement it yourself. It's not hard. For example, after you get results from solr and before you display the results to the end user, replace "location" with "<font color='red'>location</font>" (just an example. you'd better to use CSS)

Peter Long
:) Well, actual implementation is way more complex, and this is not that easy to do so. Basically there are many fields in filtered query, some returns words, some phrases etc. We've already implemented the kind of `manual highlighting`, but I'm still going to use Solr to do that.
archer