lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nishu Soni <nishu.s...@3i-infotech.com>
Subject Re: Lucene Not Throwing Matches Without Spaces
Date Wed, 18 Nov 2009 05:28:38 GMT

Simon,

Thanks for replying.Next time, I will take care to post question in right
forum.

I understood your explanation.But still, if I want to get matches without
space in lucene,
is there any way out.

Nishu



Simon Willnauer wrote:
> 
> Nishu,
> 
> first you should send this question to java-users not to general :)
> When you index a doc the the content "mighty duck" your TokenStream
> most likely builds two tokens t1:"mighty" t2:"duck"
> the same happens (most likely) when you search for "mighty duck" with
> the QueryParser so the query will be a boolean TermQuery("mighty") OR
> TermQuery("duck"). This will retrieve your document. If you search for
> "mightyduck" the query will only have one boolean clause (actually
> none, its just a term query) with TermQuery("mightyduck"). Lucene will
> not find any matches as this term is not in the index.
> 
> Hope that helps for understanding what is going on.
> 
> simon
> 
> On Tue, Nov 17, 2009 at 2:16 PM, Nishu Soni  wrote:
>>
>> Lucene is not throwing matches when search string is without space and
>> data
>> in my index file is with space.For e.g. if "Saddam Hussain" text is in
>> index
>> file and I am searchin "SaddamHussain", I am not getting any matches.I am
>> using Boolean Query for scanning.
>>
>> Any help will be highly appreciated.
>> --
>> View this message in context:
>> http://old.nabble.com/Lucene-Not-Throwing-Matches-Without-Spaces-tp26389750p26389750.html
>> Sent from the Lucene - General mailing list archive at Nabble.com.
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/Lucene-Not-Throwing-Matches-Without-Spaces-tp26389750p26402748.html
Sent from the Lucene - General mailing list archive at Nabble.com.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message