lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Entwhistle <...@snapstream.com>
Subject Re: ITermAttribute SetTermBuffer migration from 3.0.3
Date Thu, 12 Apr 2018 21:13:23 GMT
Hi Bryan,

You just need to convert the string to a char array. Something like this
should work for you:

termAtt.CopyBuffer( buffer.ToCharArray(), 0 , buffer.Length );

Cheers
Bob

On Thu, Apr 12, 2018 at 12:08 PM, Bryan Rojo <BryanRojo@elliottelectric.com>
wrote:

> I see that ITermAttribute was replaced by ICharTermAttribute in 4.0
>
> I previously used TermAttribute.SetTermBuffer(string) but there is no
> longer an overload that simply takes a string as a parameter, plus I can't
> create a wrapper because the Support.TextSupport class was also removed
>
> The method CopyBuffer is the new way to do this but Im not sure how I can
> call it with just a string
>
>
> Thank You for your help!
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message