You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Andrew Schuler <an...@gmail.com> on 2017/08/22 16:39:40 UTC

Issue with numeric fields in 4.x

Hello,

I'm new to this list and a Lucene n00b so I'm hoping you all can help me.
I'm consuming an index that was built with version 4.7.2. The index has
numeric fields. When I try to search on those fields I get no result. I
opened the index up with Luke and it seems there is something weird going
on with those field. I can see that there are values in the fields but when
I try to access them it just show gibberish. Has anyone seen this before
and can maybe point me in the right direction to troubleshooting this
further? I'm including a screenshot of Luke that demonstrated what I'm
talking about.

[image: Inline image 1]

Any help would be greatly appreciated as this has had me stuck for a while!

Re: Issue with numeric fields in 4.x

Posted by Andrew Schuler <an...@gmail.com>.
Okay, that makes sense.
Thanks!


On Tue, Aug 22, 2017 at 9:58 AM, Uwe Schindler <uw...@thetaphi.de> wrote:

> Hi,
>
> If you use NumericField you can only use NumericRangeQuery to search on
> them (also for single value query aka TermQuery). The same applies for
> Lucene 6s point fields. Most query parsers have no schema information, so
> they can only create Term* not Numeric* query types, unless you subclass
> them to have special handling for the fields without classical terms.
>
> Uwe
>
> Am 22. August 2017 18:39:40 MESZ schrieb Andrew Schuler <
> andrew.schuler@gmail.com>:
> >Hello,
> >
> >I'm new to this list and a Lucene n00b so I'm hoping you all can help
> >me.
> >I'm consuming an index that was built with version 4.7.2. The index has
> >numeric fields. When I try to search on those fields I get no result. I
> >opened the index up with Luke and it seems there is something weird
> >going
> >on with those field. I can see that there are values in the fields but
> >when
> >I try to access them it just show gibberish. Has anyone seen this
> >before
> >and can maybe point me in the right direction to troubleshooting this
> >further? I'm including a screenshot of Luke that demonstrated what I'm
> >talking about.
> >
> >[image: Inline image 1]
> >
> >Any help would be greatly appreciated as this has had me stuck for a
> >while!
>
> --
> Uwe Schindler
> Achterdiek 19, 28357 Bremen
> https://www.thetaphi.de

Re: Issue with numeric fields in 4.x

Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi,

If you use NumericField you can only use NumericRangeQuery to search on them (also for single value query aka TermQuery). The same applies for Lucene 6s point fields. Most query parsers have no schema information, so they can only create Term* not Numeric* query types, unless you subclass them to have special handling for the fields without classical terms.

Uwe

Am 22. August 2017 18:39:40 MESZ schrieb Andrew Schuler <an...@gmail.com>:
>Hello,
>
>I'm new to this list and a Lucene n00b so I'm hoping you all can help
>me.
>I'm consuming an index that was built with version 4.7.2. The index has
>numeric fields. When I try to search on those fields I get no result. I
>opened the index up with Luke and it seems there is something weird
>going
>on with those field. I can see that there are values in the fields but
>when
>I try to access them it just show gibberish. Has anyone seen this
>before
>and can maybe point me in the right direction to troubleshooting this
>further? I'm including a screenshot of Luke that demonstrated what I'm
>talking about.
>
>[image: Inline image 1]
>
>Any help would be greatly appreciated as this has had me stuck for a
>while!

--
Uwe Schindler
Achterdiek 19, 28357 Bremen
https://www.thetaphi.de