For autocompletion feature What is recommended type of the field? keyword or text

String type has been removed and index time search as you type example is using "string" type. I did that by replacing it with text but i'm not getting expected results yet. May be i should use "keyword" type.

Any recommendation is appreciable.

Thanks

Oh, i think custom analyser can not be defined on field of type "keyword" during mapping creation. So i'm left with type "text".

From Elasticsearch 5.2.0+, keyword field data type supports a normalizer, which is essentially an analysis chain that produces only a single token.

There's also the completion field data type used by completion suggesters

@forloop thanks to update here. It has worked the way you suggested. BTW, completion suggesters are really cool.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.