Hello,
My query result (match all) using head plugin search:
locahost:9200/mydb/mycollect/_search
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 1,
"hits": [
{
"_index": "mydb",
"_type": "mycollect",
"_id": "54ac6333b760d23c7635ce0b",
"_score": 1,
"_source": {
"content": {
"_content_type": "String",
"_title": "def.xml",
"_content":
"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI"
},
"filename": "def.xml",
"contentType": "String",
"md5": "4f5cfde85d1b6f48658b82af980714c7",
"length": 2438,
"chunkSize": 261120,
"uploadDate": "2015-01-06T22:35:31.289Z",
"metadata": {
"Description": "def XML File",
"tags": [
"def"
,
"XML"
]
}
}
}
]
}
}
I'm able to find "filename". But wondering how do I fetch "Description" &
"tags" fields from "metadata".
I'm using Jest client to execute search which is not returning
"Description" field contents:
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
searchSourceBuilder.query(QueryBuilders.wildcardQuery("Description", "*"));
Search search = new Search.Builder(searchSourceBuilder.toString())
// multiple index or types can be
added.
.addIndex("mydb")
.addType("mycollect")
.build();
Appreciate your help.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/343c8ac1-4b7b-48b9-b31c-abcbba61d72d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.