clojurewerkz/elastisch — pull request #31 by sorenmacbeth (2013-07-02 06:50:44+00:00)
Title: Properly get fields into native search response

When returning a subset of fields from a query, _source was returned as nil and the :_fields key was missing. For example:

```clojure
(let [res (esd/search "index" "mapping"
:query (q/term :my_term "foo")
:fields ["field1" "field2"]
:size 5)]
(pp/pprint (esrsp/hits-from res))))
```

The PR will return either :_source if no filtering fields are specified, or :_fields if any are.