Skip to content

Commit

Permalink
Fix misleading es utils documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nonword committed Oct 17, 2024
1 parent ea4cd80 commit 75eada0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/elasticsearch/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const buildEsMatchClause = (matcher, field, value, boost) => {
* `prefix` clause that can be inserted into a ES query.
*
* For example:
* const query = { prefixMatch('idIsbn', '1234' }
* const body = { query: prefixMatch('idIsbn', '1234' }
*/
const prefixMatch = (field, value, boost = 1) => {
return buildEsMatchClause('prefix', field, value, boost)
Expand All @@ -90,7 +90,7 @@ const prefixMatch = (field, value, boost = 1) => {
* `term` clause that can be inserted into a ES query
*
* For example:
* const query = { termMatch('idBarcode', '1234567891011' }
* const body = { query: termMatch('idBarcode', '1234567891011' }
*/
const termMatch = (field, value, boost = 1) => {
return buildEsMatchClause('term', field, value, boost)
Expand All @@ -101,7 +101,7 @@ const termMatch = (field, value, boost = 1) => {
* `match_phrase` clause that can be inserted into a ES query
*
* For example:
* const query = { phraseMatch('title', 'Importance of Being' }
* const body = { query: phraseMatch('title', 'Importance of Being' }
*/
const phraseMatch = (field, value, boost = 1) => {
return {
Expand Down

0 comments on commit 75eada0

Please sign in to comment.