Last active
October 13, 2015 16:38
-
-
Save maxpeterson/4224964 to your computer and use it in GitHub Desktop.
Cloudant CustomSearch for creating a private jamjs.org
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| exports.repositories = [ | |
| { | |
| url: "https://USERNAME:[email protected]/DATABASE", | |
| search: "https://USERNAME:[email protected]/DATABASE/_design/lucene/_search/jam" | |
| }, | |
| "http://jamjs.org/repository" | |
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "indexes": { | |
| "jam": { | |
| "index": "function(doc){ | |
| index(\"default\", doc._id); | |
| if(doc.name){ | |
| index(\"default\", doc.name, {\"store\": \"yes\"}); | |
| } | |
| if(doc.keywords){ | |
| index(\"default\", doc.keywords, {\"store\": \"yes\"}); | |
| } | |
| if(doc.description){ | |
| index(\"default\", doc.description, {\"store\": \"yes\"}); | |
| } | |
| }" | |
| } | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To set up a private http://jamjs.org/ repository on https://cloudant.com/
curl -X PUT https://USERNAME:[email protected]/DATABASE/_design/lucene [email protected]Further info on Cloudant lucen search indexes at https://cloudant.com/for-developers/search/