kivik icon indicating copy to clipboard operation
kivik copied to clipboard

Add support for full text search

Open flimzy opened this issue 5 years ago • 5 comments

CouchDB 3.0.0 adds (optional) full-text support through the _search endpoint. Support should be added for this, and the related _search_analyze endpoint.

  • https://docs.couchdb.org/en/stable/api/ddoc/search.html
  • https://docs.couchdb.org/en/stable/api/ddoc/search.html#db-design-design-doc-search-info-index-name
  • https://docs.couchdb.org/en/stable/api/server/common.html#search-analyze

flimzy avatar Feb 28 '20 15:02 flimzy

The following endpoints were added:

  • GET /{db}/_design/{ddoc}/_search/{index}
  • GET /{db}/_design/{ddoc}/_search_info/{index}
  • POST /_search_analyze

flimzy avatar Feb 29 '20 09:02 flimzy

I think I can add three methods to satisfy this new API:

  • Search(), the analog to Query() and Find(), will be used to perform search queries.
  • SearchInfo() will be used for the _search_info endpoint
  • SearchAnalyze will be the analog to Explain for mango queries.

flimzy avatar Feb 29 '20 09:02 flimzy

Testing this functionality is non-trivial, as starting the Lucene plugin is not currently possible with standard Docker. For now I'm putting this on hold until it is easier to test, or there is a pressing need for it, to serve as motivation to device an alternate testing method.

flimzy avatar Mar 15 '20 20:03 flimzy

Hey I got this working in docker following the guide at https://github.com/apache/couchdb-docker/issues/8#issuecomment-637936896

so can we add this back in?

rossmerr avatar Oct 08 '20 14:10 rossmerr

Thanks for the heads-up, @RossMerr! That's very promising, and full text search is something I'm likely to need at work soon, so I'll see about getting around to working on this feature when time permits (and a PR is course welcome if someone else has time before I get to it).

flimzy avatar Oct 08 '20 15:10 flimzy