Tom
Tom

Reputation: 6342

How to only store the index,not the original text in ES

I am using elastic search 7.10.1. I would store and search against my blogs. The blog has id,title and content fields.

I would like to search against id, title and content, but since the content of blog is too big, so that I would like to save the original content text outside of Elastic Search, such as HBase.

I would ask how to achieve this in ES?

Upvotes: 1

Views: 563

Answers (1)

Amit
Amit

Reputation: 32386

If you are using a static mapping then simply don't define your content field in your index mapping, and don't populate it while indexing your document to ES.

Refer to Mapping param for more info, and specifically, store param default false which means you can't retrieve field value if _source(true by default) is also disabled.

index param default true, which controls whether the field is searchable or not, in your case if you don't want to search and retrieve it you have to disable these two params.

Upvotes: 2

Related Questions