lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tskumar <>
Subject ConstantScoreRangeQuery returns wrong results
Date Thu, 15 Nov 2012 18:09:44 GMT
I am using ConstantScoreRangeQuery for seaching all ip addresses of range
where range is to  This is pretty much searching
all ipV4 adresses.

I am converting all my ip addresses to strings and indexing them.  For
example, becomes 00000000 and becomes ffffffff
where every 2 chars are one octets.

When I am searching for ip addresses, I am creating query as follows:
ConstantScoreRangeQuery(fldIdStr, "00000000", "ffffffff", true, true)

I am storing both ip V4 as well as ip v6.  This query returning ipv6 as

I am using Lucene (lucene-core-2.4.0.jar) 2.4.0;

Please let me know how can I get only ipv4 addresses.


View this message in context:
Sent from the Lucene - Java Users mailing list archive at
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message