Querying with fields="*" to get all fields


(debuggr) #1

Hi all,

According to http://www.elasticsearch.org/guide/reference/api/search/fields.html,
using fields="*" with my search query should return all stored fields
for each search hit. Unfortunately, this doesn't seem to work on our
ES cluster.

Here is an example from search.elasticsearch.org:
http://search.elasticsearch.org/elastic-search-website/guide,blog/_search?query=term&fields=*
hits: [
{
_index: "elastic-search-website"
_type: "guide"
_id: "guide___reference___api___admin-indices-flush"
_score: 1
},
{
_index: "elastic-search-website"
_type: "guide"
_id: "guide___reference___api___admin-indices-get-settings"
_score: 1
},
...]

If I use a valid field in the query, things work as expected:
http://search.elasticsearch.org/elastic-search-website/guide,blog/_search?query=term&fields=title
hits: [
{
_index: "elastic-search-website"
_type: "guide"
_id: "guide___reference___api___admin-indices-flush"
_score: 1
-fields: {
title: "Flush API"
},
}
{
_index: "elastic-search-website"
_type: "guide"
_id: "guide___reference___api___admin-indices-get-settings"
_score: 1
-fields: {
title: "Get Settings API"
}
}
...]

Is there something I'm doing incorrectly? If not, could this be a
bug?

I'm hoping there's a really simple answer to this problem. I've
searched around and haven't found anything. I don't think I'm doing
anything obviously wrong.

Thanks in advance,
Simon


(Shay Banon) #2

The content of the message has not been downloaded yet.


(Arun Prakash) #3

i am also stugling with the same point, i need to get all the fields in a search doc using query.... if possible please guide me to get the result.

Thanks
Sarohan


(system) #4