[
https://issues.apache.org/jira/browse/LUCENE-5596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13969324#comment-13969324
]
Uwe Schindler edited comment on LUCENE-5596 at 4/15/14 8:34 AM:
----------------------------------------------------------------
Hi,
I would start with a TokenStream only, like we do for NumericTokenStream. The
solution with a TokenFilter is currently not doable, because of the coupling of
TermToBytesRef attribute and CharTermAttribute with only using an
AttributeFactory as workaround to decouple. I am thinking about a better
solution for Lucene 5.0, this is one of the big issues preventing people from
indexing pure-byte[] terms.
About the ES issue: If we have some byte[] support, there is no need to use
BigInteger for IPv6 adresses! Just use
[http://docs.oracle.com/javase/7/docs/api/java/net/Inet6Address.html#getAddress()]
to get the bytes of the address in network byte order (big endian), no need to
convert to BigInteger first and deal with the stupid signedness issues. This
would also work with IPv4 addresses, which return a {{byte\[4\]}} on the same
method (see base class
[http://docs.oracle.com/javase/7/docs/api/java/net/InetAddress.html#getAddress()]).
was (Author: thetaphi):
Hi,
I would start with a TokenStream only, like we do for NumericTokenStream. The
solution with a TokenFilter is currently not doable, because of the coupling of
TermToBytesRef attribute and CharTermAttribute with only using an
AttributeFactory as workaround to decoule. I am thinking about a better
solution for Lucene 5.0, this is one of the big issues preventing people from
indexing pure-byte[] terms.
About the ES issue: If we have some byte[] support, there is no need to use
BigInteger for IPv6 adresses! Just use
[http://docs.oracle.com/javase/7/docs/api/java/net/Inet6Address.html#getAddress()]
to get the bytes of the address in network byte order (big endian), no need to
convert to BigInteger first and deal with the stupid signedness issues. This
would also work with IPv4 addresses, which return a {{byte\[4\]}} on the same
method (see base class
[http://docs.oracle.com/javase/7/docs/api/java/net/InetAddress.html#getAddress()]).
> Support for index/search large numeric field
> --------------------------------------------
>
> Key: LUCENE-5596
> URL: https://issues.apache.org/jira/browse/LUCENE-5596
> Project: Lucene - Core
> Issue Type: New Feature
> Reporter: Kevin Wang
> Assignee: Uwe Schindler
> Attachments: LUCENE-5596.patch, LUCENE-5596.patch
>
>
> Currently if an number is larger than Long.MAX_VALUE, we can't index/search
> that in lucene as a number. For example, IPv6 address is an 128 bit number,
> so we can't index that as a numeric field and do numeric range query etc.
> It would be good to support BigInteger / BigDecimal
> I've tried use BigInteger for IPv6 in Elasticsearch and that works fine, but
> there are still lots of things to do
> https://github.com/elasticsearch/elasticsearch/pull/5758
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]