works great - thanks!

On Wed, Mar 23, 2011 at 1:04 AM, Robert Muir <[email protected]> wrote:
>
> On Mar 22, 2011 11:38 PM, "Ryan McKinley" <[email protected]> wrote:
>>
>> I'm messing with putting binary data directly in the index.  I have a
>> field class with:
>>
>>  @Override
>>  public TokenStream tokenStreamValue() {
>>    byte[] value = (byte[])fieldsData;
>>
>>    Token token = new Token( 0, value.length, "geo" );
>>    token.resizeBuffer( value.length );
>>    BytesRef ref = token.getBytesRef();
>>    ref.bytes = value;
>>    ref.length = value.length;
>>    ref.offset = 0;
>>    token.setLength( ref.length );
>>    return new SingleTokenTokenStream( token );
>>  }
>>
>> but that is just writing an empty token.  Is it possible to set the
>> Token value without converting to char[]?
>>
>
> check out Test2BTerms for an example...
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to