0

How to create similar design to this one:

{ "_id": "_design/foo", "_rev": "1-166900c56b2e87d91bb48dcf890c84ed", "fulltext": { "by_title": { "index": "function(doc) { var ret=new Document(); ret.add(doc.title); return ret }" } } } 

taken from this tutorial: BlogPost

I have recompiled my CouchDB to allow couchdb-lucene. github couchdb-lucene

The problem I have is that I couldn't find any appropriate example to try to insert the design without the UI, which allows only design views, not search indexes

1 Answer 1

2

Design documents can be created the same way as regular documents, so you could use the HTTP API for documents.

You could save the design in a file, say 'yourdesign.json', and upload it with such a command:

curl -H 'Content-Type: application/json' -X PUT http://127.0.0.1:5984/yourdb/_design/foo -d @yourdesign.json 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.