You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by boraldo <bo...@mail.ru> on 2011/05/30 14:08:54 UTC
Lucene: is it possible to search with an error in one letter?
I have a document with text "pencil". I want to search it using query
"pencel". Or vica versa.
Is it possible ?
--
View this message in context: http://lucene.472066.n3.nabble.com/Lucene-is-it-possible-to-search-with-an-error-in-one-letter-tp3001723p3001723.html
Sent from the Lucene - General mailing list archive at Nabble.com.
Re: Lucene: is it possible to search with an error in one letter?
Posted by Michael McCandless <lu...@mikemccandless.com>.
If you want to allow for any single character "change", you can use
FuzzyQuery. EG, pencil~1 allows for 1 character change, pencil~2
allows for 2.
Note that FuzzyQuery is very costly in 3.x, but is substantially (eg
factor of 100 times) faster in trunk / 4.0.
Mike
http://blog.mikemccandless.com
On Mon, May 30, 2011 at 1:33 PM, Otis Gospodnetic
<ot...@yahoo.com> wrote:
> Hi,
>
> Yes, penc?l should do it.
>
> Otis
> ---
> Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
> Lucene ecosystem search :: http://search-lucene.com/
>
>
>
> ----- Original Message ----
>> From: boraldo <bo...@mail.ru>
>> To: general@lucene.apache.org
>> Sent: Mon, May 30, 2011 8:08:54 AM
>> Subject: Lucene: is it possible to search with an error in one letter?
>>
>> I have a document with text "pencil". I want to search it using query
>> "pencel". Or vica versa.
>> Is it possible ?
>>
>> --
>> View this message in context:
>>http://lucene.472066.n3.nabble.com/Lucene-is-it-possible-to-search-with-an-error-in-one-letter-tp3001723p3001723.html
>>
>> Sent from the Lucene - General mailing list archive at Nabble.com.
>>
>
Re: Lucene: is it possible to search with an error in one letter?
Posted by Otis Gospodnetic <ot...@yahoo.com>.
Hi,
Yes, penc?l should do it.
Otis
---
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Lucene ecosystem search :: http://search-lucene.com/
----- Original Message ----
> From: boraldo <bo...@mail.ru>
> To: general@lucene.apache.org
> Sent: Mon, May 30, 2011 8:08:54 AM
> Subject: Lucene: is it possible to search with an error in one letter?
>
> I have a document with text "pencil". I want to search it using query
> "pencel". Or vica versa.
> Is it possible ?
>
> --
> View this message in context:
>http://lucene.472066.n3.nabble.com/Lucene-is-it-possible-to-search-with-an-error-in-one-letter-tp3001723p3001723.html
>
> Sent from the Lucene - General mailing list archive at Nabble.com.
>