lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Wettin <karl.wet...@gmail.com>
Subject Re: Questions about use of SpellChecker: Constructor and Simillarity...
Date Tue, 08 Apr 2008 17:20:16 GMT
Mathieu Lecarme skrev:
> Le 8 avr. 08 à 18:34, Karl Wettin a écrit :
>> dreampeppers99 skrev:

>>> 2º Suposse that in my dictonary I had these words:
>>> "The Lord of the Rings: The Two Towers"
>>> "The Lord of the Rings: The Fellowship of the Ring"
>>> "The Lord of the Rings: The Return of the King"
>>> I just want to know how can I code something to "suggest" when user 
>>> query
>>> "The Lord of the Rings: The Two Towers" the application suggest: "The 
>>> Lord of the Rings: The Fellowship of the Ring"
>>> "The Lord of the Rings: The Return of the King"
>>> It is possible just using the Lucene?
>>
>> There are no typos in your example so you really don't even need a 
>> spell checker for that. Using OR clauses in your query would be 
>> enough. Perhaps you want to combine one variant with MUST clauses that 
>> has a bit more boost than the OR clauses.
> A classical OR query will match shuffled data : "The king of lord got a 
> ring" should match.
> With shingle, you will match title in the right order.

Appending a SHOULD clause containing a phrase or span query with a bit 
of boost also works.



    karl

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