Thanks Mike, I tried using dismax and it seems working. The only problem
is I could not use wildcard in the query string if I specify qt=dismax. 

I have a default search field called TITLE(TextField),
This one returns all engineer whose TITLE starts with engin:  /?q=engin*
This one does not return anything:   /?q=engin*&qt=dismax

Do you know what is the problem?

Thanks
Xuesong

-----Original Message-----
From: Mike Klaas [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 04, 2007 11:46 AM
To: solr-user@lucene.apache.org
Subject: Re: question about highlight field

On 4-Jun-07, at 9:56 AM, Xuesong Luo wrote:

>
> So if I need to search a string in field f1, f2, f3 and highlight them
> in the response, I have to append hl.fl=f1,f2,f3 to my query. Is this
> the only solution?  I thought of using searchall field, but the  
> problem
> is the highlight element doesn't tell which value belongs to which
> field, as you can see in the example above, I can't tell the Senior
> Event Manager is from TITLE or other fields.

As Chris mentioned, I'm not sure how Solr could "know" that you want  
to highlight those fields, given that you aren't even searching them.

One option is to search those fields directly, using dismax.  In that  
case, the highlight fields will be picked up automatically.

-Mike


Reply via email to