lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mark harwood <markharw...@yahoo.co.uk>
Subject Re: get original term for synonym
Date Mon, 12 Nov 2007 15:49:48 GMT
>>Is there a simple way to make the synonym return the
 word it points to?

Give the highlighter the same analyzer you used to create the index, not the one you use to
parse the query. This should ensure the set of words to be highlighted includes all synonyms.

Cheers
Mark

----- Original Message ----
From: Matthijs Bierman <matthijs@impressie.nl>
To: java-user@lucene.apache.org
Sent: Monday, 12 November, 2007 2:54:45 PM
Subject: get original term for synonym

Hi there,

Currently I am trying to get synonyms to work. I have gotten as far as 
injecting them into the index as Token.type SYNONYM. Lucene then finds 
the original word and synonym and points to the same document. So far
 so 
good.

However, I am stuck at highlighting the result. I have highlighters of 
my own that currently need an array of words to highlight. Extraction
 is 
done from the query, but the query gives the synonym, instead of the 
word it points to. Therefore highlighting is incorrect (or rather 
non-existent). Is there a simple way to make the synonym return the
 word 
it points to?

Thank you in advance,
Matthijs Bierman
(Netherlands)

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






      ___________________________________________________________ 
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good  http://uk.promotions.yahoo.com/forgood/environment.html

---------------------------------------------------------------------
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