amco / dolly

Not an ORM for CouchDB in rails.
8 stars 3 forks source link

Add clouseau search index task #190

Closed javierg closed 2 years ago

javierg commented 2 years ago

This task will allow to add searches with Clouseau Engine

https://docs.couchdb.org/en/3.2.0/ddocs/search.html#index-functions

The create index task works by reading the folder:

db/searches

And parsing each JS file it encounters in the folder into a single _design/base_filename document

The only supported extension is .js

And the index will be named the same as the filename, so db/searches/my_index.js will be queried like: _design/_my_index/_search/my_index?q=*:*