ncb000gt / node-es

NodeJS module for ElasticSearch.
103 stars 81 forks source link

I get only one field back #48

Closed ohadperry closed 10 years ago

ohadperry commented 10 years ago

I only get the last field('name') from server If I change the order, I still get only the last one.

elastic_client.search({
        _index : 'sanger',
        _type  : 'products',
        fields: [
            'tags',
            'stores_available_in',
            'product_id',
            'locale',
            'name'
        ]
    }, {
        query : qryObj
    }, function (err, data) {
        callback(data['hits'].hits);
    });
brozeph commented 10 years ago

Adding reference while working on the fix for this issue: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-fields.html

brozeph commented 10 years ago

Thanks @ohadpartuck for the great bug find! Fixed in v0.4.4

ohadperry commented 10 years ago

Confirmed Fixed :+1: