lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ernesto De Santis <ernesto.desan...@colaborativa.net>
Subject highlight only one field
Date Fri, 11 Nov 2005 15:35:33 GMT
Hi

I'm using highlighter and have this problem:

The query is over two or more fields, like:
*body:home AND title:sale*

I want to highlight over body field, but not highlight "sale" if "sale" 
is in body.

How I can do this?

When I create a Highlighter instance, the parameter is the query:
*highlighter = new Highlighter(new QueryScorer(query));*
but I don't say witch is the field to highlight.

The another QueryScorer constructor is:
*QueryScorer(WeightedTerm[] wet);*

But, who I can get the terms from body field in my query?

Regards
Ernesto.

-- 
Ernesto De Santis - Colaborativa.net
La Plata, Argentina.
http://www.colaborativa.net/


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message