Hi
when i upgrade my ES from 1.7 to ES 5.6, i can't use this setSource(String) method anymore, please tell me . what kind of method i can use it in order to make my service alive again.
thanx
.
this is a old method i can't use. what is it replaced by?
Hi,
you cannot set the source directly anymore, you need to use a SearchSourceBuilder instead. That will give you a lot of convenience methods for building your search request (like adding queries via QueryBuilder) etc... Creating the SearchSourceBuilder from a String (e.g. Json) directly would require some sort of parsing, which can be done but should probably be avoided since it requires you to have access to a few internal registries to do the parsing. Hope this helps a bit.
thanx a lot, i fixed this problem already.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.