search requests with _source false - don't work as expected

13 views
Skip to first unread message

Dave Tenny

unread,
Aug 19, 2016, 8:45:12 AM8/19/16
to clojure-elasticsearch
Without having run the unit tests in Elastisch, I'm having trouble understanding how the

test-search-with-source-disabled

test in
elastisch/test/clojurewerkz/elastisch/native_api/search_test.clj

ever got nil for _source.

The problem is the way that the :_source check is coded on search request processing (3.0.0-beta1)

There is no way to get the call to

(.fetchSource sb false)

to execute because the caller tests if _source is true and if _source is false/nil, the call to 

add-partial-fields-to-builder


never occurs.

So the upshot is that so far I have been unable to execute a search that retrieves no _source values.
(though I'm going to try a source specification with zero fields in the 'in' clause next).

I'm just trying to fetch ID's for a call to bulk delete, since the delete-by-query API is gone now.


Dave Tenny

unread,
Aug 19, 2016, 8:48:43 AM8/19/16
to clojure-elasticsearch
:_source {:exclude "*"}

Has the desired effect.
Reply all
Reply to author
Forward
0 new messages