Hello,
I am able to search binary documents, but the search response always has the
original file content. How not to get the file content back in the search
response?
This is how I create the search and build the JSON string:
String mapping =
IOUtils.toString(getClass().getResourceAsStream("/test-mapping.json"));
client.admin().indices().create(new
CreateIndexRequest(indexName).mapping(indexType, mapping)).actionGet();
client.admin().cluster().health(new
ClusterHealthRequest(indexName).waitForYellowStatus()).actionGet();
Did I miss out anything?
Hello,
I am able to search binary documents, but the search response always has the
original file content. How not to get the file content back in the search
response?
This is how I create the search and build the JSON string:
you are getting back the document content in the response because it is part
of the _source field which is returned for each hit by default. Try to check
field query Elasticsearch Platform — Find real-time answers at scale | Elastic to
selectively return only specific field values.
Hello,
I am able to search binary documents, but the search response always has
the original file content. How not to get the file content back in the
search response?
This is how I create the search and build the JSON string:
you are getting back the document content in the response because it is part of
the _source field which is returned for each hit by default. Try to check field
query Elasticsearch Platform — Find real-time answers at scale | Elastic to
selectively return only specific field values.
To: users@elasticsearch.com
Sent: Sat, March 5, 2011 12:22:28 PM
Subject: search always return the original file
Hello,
I am able to search binary documents, but the search response always has the
original file content. How not to get the file content back in the search
response?
This is how I create the search and build the JSON string:
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.