public override void SetStringValue(string value) { key = collator.GetSortKey(value); bytes.Bytes = key.KeyData; bytes.Offset = 0; bytes.Length = key.KeyData.Length; }
public override void FillBytesRef() { BytesRef bytes = this.BytesRef; key = collator.GetSortKey(ToString()); bytes.Bytes = key.KeyData; bytes.Offset = 0; bytes.Length = key.KeyData.Length; }
public override bool IncrementToken() { if (m_input.IncrementToken()) { char[] termBuffer = termAtt.Buffer; string termText = new string(termBuffer, 0, termAtt.Length); reusableKey = collator.GetSortKey(termText); int encodedLength = IndexableBinaryStringTools.GetEncodedLength( reusableKey.KeyData, 0, reusableKey.KeyData.Length); if (encodedLength > termBuffer.Length) { termAtt.ResizeBuffer(encodedLength); } termAtt.SetLength(encodedLength); IndexableBinaryStringTools.Encode(reusableKey.KeyData, 0, reusableKey.KeyData.Length, termAtt.Buffer, 0, encodedLength); return(true); } else { return(false); } }