lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Péter Király <>
Subject Re: Does any one know how to expand queries using Wordnet with Lucene 3.6?
Date Fri, 15 Jun 2012 18:07:24 GMT

maybe not the one you are looking for, only a similar thing what I
have create:
This is a Drupal module and a distinct Java class. The Java class
creates an XML file, which can be imported into Solr, to build a
Wordnet index (so I have two indexes: one for my content, and one for
wordnet). The Drupal module provides synonyms as links, so if the user
enters a term, below or upon the search results a list of synsets is
shown up, as links. The user can click any synonym or a special "all
synonyms" link, wich runs the refinement search. For me the suggested
solution of using Wordnet in a SynonymFilter produced very-very
strange results, because sometimes (and more frequently as
toleratable) the synonyms go too far from the impliciltly intended
meaning. For example Wiener -> Frankfurter -> hot dog is a real-world
example. You can imagine that your result set will be fulfilled with
unwanted hits when you search for Wien (capital of Austria). For me
not to handling it automatically, but provide something the user to
help him to refine the search is the optimal solution.

Király Péter

2012/6/15 Robert Muir <>:
> See its test:
> The idea is you parse the wordnet file with this thing, and create a
> SynonymFilter that you use in your query Analyzer (The one you pass to
> QueryParser).
> On Fri, Jun 15, 2012 at 6:27 AM, Kits89 <> wrote:
>> I've found the class WordnetSynonymParser in
>> org.apache.lucene.analysis.synonym but there aren't examples of its usage
>> neither in the API nor in google. Does any one have experience with it?
>> Thank you!
>> EDIT: I know that there used to be the class SynExpand, but with version 3.6
>> it disappeared...
>> --
>> View this message in context:
>> Sent from the Lucene - Java Users mailing list archive at
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> --
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message