Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.nio.file.InvalidPathException;

import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.collation.ICUCollationDocValuesField;
import org.elasticsearch.common.io.Streams;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.Environment;
Expand Down Expand Up @@ -172,6 +173,6 @@ public IcuCollationTokenFilterFactory(IndexSettings indexSettings, Environment e

@Override
public TokenStream create(TokenStream tokenStream) {
return new ICUCollationKeyFilter(tokenStream, collator);
return new ICUCollationDocValuesField(tokenStream.toString(), collator).tokenStreamValue();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt this is going to be sufficient. ICUCollationDocValuesField's first argument is a the field name (per Javadoc) and I'm not sure the tokenStreamValue will work either, but maybe it does.

}
}