Closed iulianav closed 6 years ago
@lnielsen as I mentioned, with the current test structure, it am not sure it is possible to add a reliable test to handle both ES2 and ES5. What do you think?
Sorry, didn't see the last comment. In the test I think you can do the same as the in the code
if ES_VERSION[0] >= 5:
# assert that a non-requested field *is not* returned
else:
# assert that a non-requested field *is* returned
This way Travis will run both on v2 and v5 and the test coverage should make sure we have both lines covered.
@lnielsen I was considering it at some point, but then it seemed like a bad practice... however, if you are ok with it I shall do it this way! Thanks!
ping @lnielsen
Make ES5 suggesters support source filtering in order to save network overhead by filtering out useless fields from the
_source
key (or just strip_source
altogether) returned in the response. Suggester fields configuration should now contain a_source
key that will specify the source filtering for each suggestion field. The possible values for the_source
key are the same as the ones specified in source filtering documentation.Example configuration:
With the current test structure, it is not possible to add a reliable test to handle both ES2 and ES5.
Signed-off-by: Iuliana Voinea iulianavoinea96@gmail.com