Skip to content

Instantly share code, notes, and snippets.

@kraftb
Created December 4, 2013 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kraftb/7790234 to your computer and use it in GitHub Desktop.
Save kraftb/7790234 to your computer and use it in GitHub Desktop.
In other solr plugins I saw the following code to add/reset the current term:
Stem stem = buffer.remove(0);
termAtt.copyBuffer(stem.getStem(), 0, stem.getStemLength());
termAtt.setLength(stem.getStemLength());
I use something the following code:
charTermAttr.setEmpty().append(compounds.remove());
do you think this can cause problems?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment