Hi,

I have a requirement to highlight search keywords in the results and display the matching fragment of the text with the results. I am using the Hits highlighting mentioned in Lucene in Action.

Here is the search query(BooleanQuery) I am passing to the IndexSearcher and QueryScorer:
+DocumentType:news
+(CompanyId:10 CompanyId:20 CompanyId:30 CompanyId:40)
+FilingDate:[20041201 TO 20051201]
+(Content:"cost saving" Content:"cost savings" Content:outsource Content:outsources Content:downsize Content:downsizes Content:restructuring Content:restructure)

My requirement is to highlight only the keywords for 'Content' field, but the highlighter api is also highlighting words like 'news', '10', '40' etc. Is there anyway to restrict the highlighter to highlight only the values mentioned for the field 'Content'?

Thanks,
Harini





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to