Disable field index


(Hitesh Hotchandani) #1

Is it possible to toggle searchable field.
My index contains around 3000 fields and 1200k documents, at times I see memory issues. On further analysis, I found that due to large number of fields, not all fields are available in the heap.
I think, for my usecase, the probable solution will be to disable searching/indexing on fields that are marked as not searchable in my application.
How ever, my application provides functionality to toggle the "Searchable" switch. This would mean that a field not searchable at a particular point of time, can become searchable at another point of time.

Is it possible though?


(Mark Walkom) #2

It's not dynamic, no.

You could setup a multi-field, where one is indexed and the other is not. Then your app could query one or the other based on the switch.


(Hitesh Hotchandani) #3

Hi Mark,

The idea is to reduce the load on memory. And I already have multi field for numeric, date and text field to handle different usecase where user can change the type of data a field will hold.

Any idea if this is possible?
What I found online was to create a new index with the required field disabled and then reindex the data to the new index


(Mark Walkom) #4

That is another option.


(Hitesh Hotchandani) #5

Hi @warkolm ,

Any chance toggling fielddata on fields might do the trick?The doc here happens to say something similar.

I am still trying this out.


(Mark Walkom) #6

Depends what version you are on, newer versions use less fielddata to reduce overall heap pressure.

How much of a problem is this though?


(Hitesh Hotchandani) #7

I am using 6.3.
And from the docs, I can presume that this might work. Didn't get a chance to dig deeper into the implementation. :frowning:


(system) #8

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