The resource /users/1/_source will return data WITHOUT ANY METADATA, like:
{
"id" : 1,
"name" : "John"
}
There is a way to get an array of sources WITHOUT ANY METADATA if a search is submitted to a specific document (e.g., /users/_search )? The expected result will be something like:
Exactly. I tried to use your plugin in ES 2.1, but got this error:
ERROR: Could not find plugin descriptor 'plugin-descriptor.properties' in plugin zip
But I was wondering if there is a way to do that in ES 2.1 directly. I've checked many old threads about this subject, so I just want to be sure that this still isn't possible for 2.1 before I go to other directions.
But I think I will have to write plain Java requests (without the ES Java API) to use your plugin, because client.prepareSearch(...) will result in a HTTP _search.
Your english is good, I understand, at least I hope so
Java is not using HTTP _search, it uses transport protocol (native Elasticsearch node-to-node protocol) over port 9300.
With Java search API, you get a SearchResponse object. From there you can iterate through the search hits. Therefore, you can see hits as an array. No metadata like _index, _type, _id are in the way, like in JSON hits, which are transported over HTTP API.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.