Maybe, you need
queryParser.setLowercaseExpandedTerms(false)

DIGY

On Thu, Jun 23, 2011 at 9:37 AM, Pranav goyal <pranavgoyal40...@gmail.com>wrote:

> 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 <ian....@gmail.com> 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
> > <pranavgoyal40...@gmail.com> 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 <
> > pranavgoyal40...@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-unsubscr...@lucene.apache.org
> > For additional commands, e-mail: java-user-h...@lucene.apache.org
> >
> >
>
>
> --
> I'm very responsible, when ever something goes wrong they always say I'm
> responsible --
>

Reply via email to