FAQ
I tried it and it worked, although it's having one peculiarity.

When I search for Item_1 : it gives me 110 hits but when I use *Item_1* it
gives me 0 hits. What mistake am I doing here?

Also when I search for *341* it is giving me correct results i.e
00000341-000-000-DR
but it's not working for above case.


Thanks
Pranav
On Wed, Jun 22, 2011 at 2:10 PM, Ian Lea wrote:

What does Luke show as being indexed for that field? Other useful
tips at
http://wiki.apache.org/lucene-java/LuceneFAQ#Why_am_I_getting_no_hits_.2BAC8_incorrect_hits.3F

If that field is numeric you could use a NumericField - gets rid of
problems with leading zeros.

If by "I just want to get everything which has 341 in it" you mean you
want to match aaa341bbb and 0000341 and 341, see related thread on
this list from yesterday. Or
org.apache.lucene.search.regex.RegexQuery.



--
Ian.


On Wed, Jun 22, 2011 at 9:16 AM, Pranav goyal
wrote:
I can always use * , ?

But here I am not talking of this. I just want to get everything which has
341 in it. How to do it without * or ?

On Wed, Jun 22, 2011 at 1:00 PM, Pranav goyal <
pranavgoyal40341@gmail.com>wrote:
Hi all,

I am in a fix regarding lucene search. I know a little bit about lucene
and
have successfully created index and searched a lot of queries on that.
My main worry is that whenever I search for let say "000" it doesn't
give
me any result while if I seach for "00000341" it'll give me a hit. Even
if I
search for 341 it doesn't give me anything.

I have checked through luke also and luke is also showing no results.

Do I have to use some different analyzer? Currently I am using Keyword
Analyzer.

Thanks
Pranav


--
I'm very responsible, when ever something goes wrong they always say I'm
responsible --
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org

--
I'm very responsible, when ever something goes wrong they always say I'm
responsible --

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 8 | next ›
Discussion Overview
groupjava-user @
categorieslucene
postedJun 22, '11 at 7:31a
activeJun 23, '11 at 9:46a
posts8
users3
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase