couchbaselabs / node-ottoman

Node.js ODM for Couchbase
https://ottomanjs.com/
Apache License 2.0
287 stars 98 forks source link

Full Text Search support proposal #743

Closed gsi-alejandro closed 2 months ago

gsi-alejandro commented 9 months ago

Syntax:

import { searchQuery, SearchQuery } from 'ottoman'

async function ftsMatchWord(term) {
  return await searchQuery(
    'index-hotel-description',
    SearchQuery.match(term),
    { limit: 5 }
  )
}

const result = await ftsMatchWord('five-star');

Notes:

Steps:

  1. implement searchQuery method in the Ottoman class.
  2. Add a test suit for the searchQuery feature.
  3. Update the documentation website with the new transaction content.