lucene-java-user mailing list archives

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


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 and sometimes i get

In my code i have made the Lucene field as

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.

View this message in context:
Sent from the Lucene - Java Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message