lucene-java-user mailing list archives

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

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?


Ernesto De Santis -
La Plata, Argentina.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message