Optimized keyword fields that only have integers

(ddorian43) #1


Does lucene / es optimize (or is there a way to config) keyword fields that are guaranteed to have only numbers and only need equality filtering (for inverted-index, doc-values, term dictionary etc) ?

I remember _id has this optimization, so the number isn't stored as a string(number).

Meaning, if it stores them as strings, then it would be better to store as base64 or something similar to reduce the string size, right ?


(Glen Smith) #2


Please see [1] for information on mapping numeric fields.
Note in particular the coerce parameter.


(ddorian43) #3

Hi Glen,

I understand coerce but this has nothing to do with what I asked. I was interested in low level optimization, something like https://github.com/elastic/elasticsearch/issues/25957 but for fields and not just the _id.

(ddorian43) #4

2 weeks later bump.

(ddorian43) #5

Last bump.

(David Pilato) #6

Pinging @jpountz in case he can provide an answer.

(Mark Harwood) #7

Maybe create a custom normalizer that uses a Base64 encoding for the keyword?

(system) #8

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