fullscale / elastic.js

A JavaScript implementation of the elasticsearch Query DSL
http://docs.fullscale.co/elasticjs/
MIT License
654 stars 163 forks source link

Added partial_fields function #35

Closed eriky closed 10 years ago

eriky commented 11 years ago

fields can be used to use wildcards to control what part of the _source will be loaded based on include and exclude patterns. This function was missing, while the "fields" function was already implemented. Note that I have not created a unit test for this as I am a bit of a javascript noob still and didn't really understand the current unit tests.

mattweber commented 10 years ago

Great, thanks for this! I will review and get it merged in soon.

glongman commented 10 years ago

+100 !

ttghr commented 10 years ago

+1

mattweber commented 10 years ago

Thanks, I pushed this to master in 406a3e4c with a few small modifications. Thanks for the PR!

mattweber commented 10 years ago

Actually I didn't realize that partial fields had been deprecated in elasticsearch 1.0, so this is now support for partial fields. See b7c68b5469 and http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-source-filtering.html