lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luke Shannon" <>
Subject Handling Synonyms
Date Mon, 21 Feb 2005 16:26:48 GMT

Does anyone see a problem with the following approach?

For synonyms, rather than putting them in the index, I put the original term
and all the synonyms in the query.

Every time I create a query, I check if the term has any synonyms. If it
does, I create Boolean Query OR'ing one Query object for each synonym.

So if I have a synoym list:

red = colour, primary, stop

And someone wants to search the desc field for the red, I would end up with
something like:

( (desc:*red*) (desc:*colout*) (desc:*stop*) ).

Now the synonyms would'nt be in the index, the Query would account for all
the possible synonym terms.


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

View raw message