Dynamically setting fields to not be indexed


(Ivan Brusic) #1

My current schema contains numerous fields that are used only for the
display purposes. It would be more efficient for them not to be
indexed. Source is enabled, so these fields should be set to
"index":"no"/"store":"no". Instead of setting the index property for
each field, to "no", I created a dynamic template. This method seems
not to be working since all fields are still indexed.

My mapping: https://gist.github.com/b3e3cb20b3dce17309fa

Explicitly setting each field not to be index appears to work, but I
would prefer to have a cleaner mapping template. In other words, I
would like to override the default for the index property.

Cheers,

Ivan


(Ivan Brusic) #2

One quick additional question: are numbers indexed in ElasticSearch?
There is a setting for "index", but from what I can tell, numbers are
stored as binary fields, which are not indexed in Lucene.

On Thu, Jul 26, 2012 at 11:01 AM, Ivan Brusic ivan@brusic.com wrote:

My current schema contains numerous fields that are used only for the
display purposes. It would be more efficient for them not to be
indexed. Source is enabled, so these fields should be set to
"index":"no"/"store":"no". Instead of setting the index property for
each field, to "no", I created a dynamic template. This method seems
not to be working since all fields are still indexed.

My mapping: https://gist.github.com/b3e3cb20b3dce17309fa

Explicitly setting each field not to be index appears to work, but I
would prefer to have a cleaner mapping template. In other words, I
would like to override the default for the index property.

Cheers,

Ivan


(system) #3