Re: Indexing a binary field

2015-09-01 Thread Michael McCandless
Actually Lucene terms can be arbitrary/fully binary tokens in the low-level postings APIs. It's just that our analysis APIs are geared towards analyzing text, but using StringField you can easily index an arbitrary single-token byte[]. Mike McCandless http://blog.mikemccandless.com On Tue, Sep

Re: Indexing a binary field

2015-09-01 Thread Mark Hanfland
You are correct that Lucene only works with text (no binary or primitives), Base64 would be the way I would suggest. On Monday, August 31, 2015 11:19 AM, Dan Smith wrote: What's the best way to index binary data in Lucene? I'm adding a Lucene index to a key value store, and I want t

Re: Indexing a binary field

2015-08-31 Thread Dan Smith
Aha! My version of Lucene was out of date. That should work perfectly.  Thanks,  -Dan Original message From: Michael McCandless Date:08/31/2015 12:57 PM (GMT-08:00) To: Lucene Users , dsm...@pivotal.io Cc: Subject: Re: Indexing a binary field StringField now also

Re: Indexing a binary field

2015-08-31 Thread Michael McCandless
StringField now also takes a BytesRef value to index, so you can index a single binary token that way. Does that work? Mike McCandless http://blog.mikemccandless.com On Mon, Aug 31, 2015 at 12:19 PM, Dan Smith wrote: > What's the best way to index binary data in Lucene? I'm adding a Lucene >

Indexing a binary field

2015-08-31 Thread Dan Smith
What's the best way to index binary data in Lucene? I'm adding a Lucene index to a key value store, and I want to be able to delete documents based on a binary key. As far as I can tell the Lucene API does not support indexing binary data, and I was looking into Base64 encoding the key. Is there a