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 "Vielsack, Marcel" <ma...@capgemini.com> on 2013/11/01 11:27:10 UTC

RE: NumericField and PerFieldAnalyzer

FYI

I figured out what the problem is/was.

It was not the PerFieldAnalyzer, it was the QueryParser I used.
The QueryParser created a TermRangeQuery and not a NumericRangeQuery. 


-----Original Message-----
From: Vielsack, Marcel [mailto:marcel.vielsack@capgemini.com] 
Sent: Donnerstag, 31. Oktober 2013 17:57
To: java-user@lucene.apache.org
Subject: NumericField and PerFieldAnalyzer

Hey there,

I’m struggling with NumericRangeQueries in combination with a PerFieldAnalyzerWrapper.

My documents containing a IntField called “age”. I’m sure that there is a document contain the value 42 in field age.

If I place a query like age:42 there is no hit
If I do a range query like age:[0 TO 50] there is no hit.

I had a look at the index with “luke”. It seems like the numbers are converted to Strings. If I change the decoding in luke, the correct values are displayed.

The Analyzers I already try are: StandardAnalyzer, SimpleAnalyzer and KeywordAnalyzer.
I wonder if analyzing is the problem or if I’m looking for the problem at the wrong place.

Thanks for your help

Cheers Marcel





________________________________

Firma: Capgemini Deutschland GmbH
Geschäftsführer: Dr. Michael Schulte (Sprecher) • Dr. Uwe Dumslaff • Josef Ranner
Aufsichtsratsvorsitzender: Antonio Schnieder
Amtsgericht Berlin-Charlottenburg, HRB 98814
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.