Separating large immutable field vs mutable fields


(venkata nagaraju buddarapu) #1

Hi,

I have a scenario where my document has one large field (content /text) field which is updated very rarely(0.1%) and all others are very small fields which are updates very often(99.9%)

What is found in performance test is that if text field is not indexed then updates are super fast .

But text field is must to do free word searches

I understand why updates are super fast with out text field as elastic has to deal with very small payload to delete and insert that happens during update

so am thinking I want to divide my document in to two parts document content with only text/content field and document fields with all other fields so that my 99% cases of updates I can deal with document fields at faster rate compare to having document with text and all fields

how do I separate this two document content and document fields ?

which option I should use ? document types /multiple indexes /parent-child ?

Also please note that all sortables fields in document fields part

document content /text is analyzed field to do full text searches

Any directions on this will be help full

Regards,
Nagaraju


(venkata nagaraju buddarapu) #2

I understand that we can same document id in both document content and document fields

How do I sort on same document fields documents if the search matches on document content

For example :doc ids 1,2,3 are qualified for a search from document .now I want to sort document id 1,2,3 from document fields by using field form document field


(venkata nagaraju buddarapu) #3

can some one let me know thoughts


(Mark Walkom) #4

Probably parent child, or different indices if you are ok to do an external join/multiple queries.


(venkata nagaraju buddarapu) #5

Thanks Mark

how do I achieve sorting behavior if if separate large content/text field in document type and all other fields in another document type which has all sortable fields


(Mark Walkom) #6

External to ES, ie in your app.

This is the price of dealing in NoSQL platforms unfortunately; Relationships are hard(er)!


(system) #7