kivik
kivik copied to clipboard
Add support for full text search
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
The following endpoints were added:
- GET /{db}/_design/{ddoc}/_search/{index}
- GET /{db}/_design/{ddoc}/_search_info/{index}
- POST /_search_analyze
I think I can add three methods to satisfy this new API:
Search(), the analog toQuery()andFind(), will be used to perform search queries.SearchInfo()will be used for the_search_infoendpointSearchAnalyzewill be the analog toExplainfor mango queries.
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.
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?
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).