Have a look at
http://www.elasticsearch.org/guide/reference/api/search/script-fields.html
It should help you to return a field instead of your _source field.
HTH
David.
Le 26 juillet 2012 à 12:10, rami sellami sel.rami@gmail.com a écrit :
Dear all,
I want to know whether there is a way to return as output a part of the JSON
documents and not the whole JSON documents.I give you an example (This is the supposed result):
{"menu": {
"id": "file",
"value": "File",
"popup": {
"menuitem": [
{"value": "New", "onclick": "CreateNewDoc()"},
{"value": "Open", "onclick": "OpenDoc()"},
{"value": "Close", "onclick": "CloseDoc()"}
]
}
}}In my case I want to return only a part of the JSON document:
"menuitem": [
{"value": "New", "onclick": "CreateNewDoc()"},
{"value": "Open", "onclick": "OpenDoc()"},
{"value": "Close", "onclick": "CloseDoc()"}
]NB: I am using couchDB to the document database.
Could you please help me?
Best regards,
Rami Sellami
--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs