Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.

Commit d206195

Browse files
Froilan IrizarryFroilan Irizarry
Froilan Irizarry
authored and
Froilan Irizarry
committed
Change match query to match_phrase
- This makes the query compatible with versions 2.4, 5.x, and 6.x
1 parent e206709 commit d206195

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/searcher/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ class Searcher {
313313
// add query terms (boost when phrase is matched)
314314
if (queryParams.term) {
315315
body.query("match", "term_suggest", queryParams.term);
316-
body.query("match", "term_suggest", { query: queryParams.term, type: "phrase" });
316+
body.query("match_phrase", "term_suggest", { query: queryParams.term });
317317
}
318318

319319
// set the term types (use defaults if not supplied)

0 commit comments

Comments
 (0)