What are you using for your default query operator, and do you have autoGeneratePhraseQueries set to "true" for your field type?

I mean, a query for 192.168.1.4 shouldn't match 192.168.1.3 - unless you have autoGeneratePhraseQueries set to "false" (the default.)

-- Jack Krupansky

-----Original Message----- From: SolrUser1543
Sent: Sunday, May 18, 2014 3:20 PM
To: solr-user@lucene.apache.org
Subject: Index / Query IP Address as number.

This question was  raised here  for a few times , but no final solution was
provided .

I'am using a combination of ClassicTokenizer and WordDelimiterFactory in my
Query / Index chain.

as a result an IP like 192.168.1.3 is indexed as

192 - pos1
168 - pos2
1    - pos3
3    - pos4
19216813 - pos5


So searching for a similar ,but different address like 192.168.1.4 will
return wrong item because of match for all 3 first position.

So the question is , what is the best way do index / query by IP as number ,
but using ClassicTokenizer and WordDelimiter  ?


actually I would like to have the IP as num , without breaking it on parts .
( have only 19216813 )

Thanks .






--
View this message in context: http://lucene.472066.n3.nabble.com/Index-Query-IP-Address-as-number-tp4136760.html Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to