Skip to content

Instantly share code, notes, and snippets.

@rdmpage
Created September 24, 2012 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rdmpage/3775137 to your computer and use it in GitHub Desktop.
Save rdmpage/3775137 to your computer and use it in GitHub Desktop.
Full text search in Cloudant
{
"_id": "_design/lookup",
"_rev": "2-2763d098bce604230bfc247ca06cba05",
"language": "javascript",
"indexes": {
"all": {
"index": "function(doc) {\n if (doc.title)\n {\n index(\"title\", doc.title, {\"store\": \"yes\"});\n }\n }"
}
}
}
https://cloudant.com/db/rdmpage/bionames/_design/lookup/_search/all?q=title:synonym*&include_docs=true
{"total_rows":1,"bookmark":"g1AAAAD-eJzLYWBgYMlgTmFQSElKzi9KdUhJMtbLTS3KLElMT9VLzskvTUnMK9HLSy3JAapkSmRIsv___39WCgNzXmYOqj5DPPqSHIBkUj0ureZ4tOaxAEmGBiAF1L0_K4PJzf4DAxgkMhDvAIgpByCmwByRBQAkCFL4","rows":[{"id":"56f85758815db21807930aac3c471cf3","score":1.0,"fields":{"title":"Four new species of terrestrial earthworms belonging to the genus Amynthas (Megascolecidae: Oligochaeta) from Taiwan with discussion on speculative synonyms and species delimitation in oligochaete taxonomy","journal":"Journal of Natural History"},"doc":{"title":"Four new species of terrestrial earthworms belonging to the genus Amynthas (Megascolecidae: Oligochaeta) from Taiwan with discussion on speculative synonyms and species delimitation in oligochaete taxonomy","journal":{"name":"Journal of Natural History","volume":"41","issue":"5-8","pages":"357--379","identifier":[{"id":"0022-2933","type":"issn"}]},"year":"2007","identifier":[{"type":"doi","id":"10.1080\/00222930701201279"}],"metadata":{"id":"1905652","modified":"2011-09-15 12:22:28"}}}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment