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

Commit

Permalink
Change match query to match_phrase
Browse files Browse the repository at this point in the history
- This makes the query compatible with versions 2.4, 5.x, and 6.x
  • Loading branch information
Froilan Irizarry authored and Froilan Irizarry committed Aug 20, 2018
1 parent e206709 commit d206195
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/searcher/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ class Searcher {
// add query terms (boost when phrase is matched)
if (queryParams.term) {
body.query("match", "term_suggest", queryParams.term);
body.query("match", "term_suggest", { query: queryParams.term, type: "phrase" });
body.query("match_phrase", "term_suggest", { query: queryParams.term });
}

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

0 comments on commit d206195

Please sign in to comment.