Getting the type/mapping of a document in the response

Hello,
i'd like to get, for each document in the response to a search, the
type/mapping identifier corresponding to this particular document.
For exemple, for the following search:
$ curl -XGET 'http://localhost:9200/twitter/tweet,user/_search?
q=user:kimchy'
I'd like to have in each document of the response a field with a value
of either "user" of "tweet".

Is is possible?

Just add _type in the list of fields you want to retrieve.

Jérémie

On Thu, Nov 24, 2011 at 3:55 PM, Virgile Devaux vdevaux@gmail.com wrote:

Hello,
i'd like to get, for each document in the response to a search, the
type/mapping identifier corresponding to this particular document.
For exemple, for the following search:
$ curl -XGET 'http://localhost:9200/twitter/tweet,user/_search?
q=user:kimchy'
I'd like to have in each document of the response a field with a value
of either "user" of "tweet".

Is is possible?

--
Jérémie 'ahFeel' BORDIER

Forget about it, I was using the output of a processor that removes
those information from the original document returned by
Elasticsearch, that, of course, returns it.
Sorry for the time lost.

On 24 nov, 15:55, Virgile Devaux vdev...@gmail.com wrote:

Hello,
i'd like to get, for each document in the response to a search, the
type/mapping identifier corresponding to this particular document.
For exemple, for the following search:
$ curl -XGET 'http://localhost:9200/twitter/tweet,user/_search?
q=user:kimchy'
I'd like to have in each document of the response a field with a value
of either "user" of "tweet".

Is is possible?

Don't you have it in the _type field ?

David
@dadoonet

Le 24 nov. 2011 à 15:55, Virgile Devaux vdevaux@gmail.com a écrit :

Hello,
i'd like to get, for each document in the response to a search, the
type/mapping identifier corresponding to this particular document.
For exemple, for the following search:
$ curl -XGET 'http://localhost:9200/twitter/tweet,user/_search?
q=user:kimchy'
I'd like to have in each document of the response a field with a value
of either "user" of "tweet".

Is is possible?