Different content for _source and what gets indexed. Possible?


(es_learner) #1

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!


(Drew Raines) #2

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.

http://www.elasticsearch.org/guide/reference/mapping/

-Drew

--


(Chris Male) #3

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.

--


(es_learner) #4

Thanks, Drew.

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


(system) #5