From 3d163acb7bf29648ab419ff11271c7d2ebdac298 Mon Sep 17 00:00:00 2001 From: MJRuskin Date: Fri, 12 Apr 2019 12:50:31 +0900 Subject: [PATCH] fix: rename underscored to dots for nested query path * fix: rename underscored to dots for nested query path * fixed linting issue --- src/elasticDSL/Query/Query.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/elasticDSL/Query/Query.js b/src/elasticDSL/Query/Query.js index aa8a54a..889eeac 100644 --- a/src/elasticDSL/Query/Query.js +++ b/src/elasticDSL/Query/Query.js @@ -118,7 +118,8 @@ export function prepareQueryInResolve( if (query.bool) { query.bool = prepareBoolInResolve(query.bool, fieldMap); } - if (query.nested && query.nested.query) { + if (query.nested && query.nested.query && query.nested.path) { + query.nested.path = query.nested.path.replace(/__/g, '.'); query.nested.query = prepareQueryInResolve(query.nested.query, fieldMap); } if (query.constant_score) {