Use a PatternReplaceCharFilterFactory to map the periods to empty strings, then 
use a KeywordTokenizer and a string field type. If you want to sort it or do 
range queries, you might use an integer field.

wunder

On May 18, 2014, at 12:20 PM, SolrUser1543 <osta...@gmail.com> wrote:

> 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 .
> 
> 


Reply via email to