lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AnkitSinghal <ankising...@gmail.com>
Subject Storing Host and IP Information in Lucene
Date Mon, 10 Sep 2007 13:53:06 GMT

Hi

I have query about storing hostname and IP information in lucene,

For eg: In my Application I have some field with name host.
In my App sometimes i get value as host name and sometimes as ipaddress.
like sometimes i get ankit.xyz.com and sometimes i get 10.10.01.01

In my code i have made the Lucene field as
Field("host",value,TOKENIZED,NOSTORE).

Now the problem with above is that I cannot search for host:10.10.*

And if i make the field as UNTOKENIZED  i cannot search for queries like
host:xyz.* .

The only solution that came to my mind is to parse the value and decide if
it contains the IPaddress or hostname and then decide which type of
tokenizing to use.

But this seems to a pretty big overhead as my data us huge and parsing for
each record is not feasible.

Can any body provide with some better approach. I believe this is a very
common problem.

Ankit
-- 
View this message in context: http://www.nabble.com/Storing-Host-and-IP-Information-in-Lucene-tf4414865.html#a12593257
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message