lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tskumar <saravan.har...@gmail.com>
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 0.0.0.0 to 255.255.255.255.  This is pretty much searching
all ipV4 adresses.

I am converting all my ip addresses to strings and indexing them.  For
example, 0.0.0.0 becomes 00000000 and 255.255.255.255 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
well.

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

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

Thanks
Saravan




--
View this message in context: http://lucene.472066.n3.nabble.com/ConstantScoreRangeQuery-returns-wrong-results-tp4020568.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message