Different content for _source and what gets indexed. Possible?

Say, I have a document that I want to be in _source as-is but I want to index only its abridged version.

How can I do that?

I'm using connection.bulk_data.write() presently but can switch to using connection.index() or any other API that allows that.

Thanks!

es_learner wrote:

Say, I have a document that I want to be in _source as-is but I
want to index only its abridged version.

How can I do that?

You'll need to supply a custom mapping when you create your index
that turns off indexing of fields you wish to omit.

Elasticsearch Platform — Find real-time answers at scale | Elastic

-Drew

--

Hi,

The content of _source is exactly the JSON data was received by ES. It
isnt changed in anyway. To change what is indexed, as Drew stated, you
need to define a mapping for your content which can include different
analysis components to change what is indexed.

On Friday, October 12, 2012 7:49:15 AM UTC+13, es_learner wrote:

Say, I have a document that I want to be in _source as-is but I want to
index
only its abridged version.

How can I do that?

I'm using connection.bulk_data.write() presently but can switch to using
connection.index() or any other API that allows that.

Thanks!

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/Different-content-for-source-and-what-gets-indexed-Possible-tp4023820.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

--

Thanks, Drew.

That did it. FWIW mapping for field was index='no'