-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support using indexes for lucene searches on e.g cloudant #219
base: master
Are you sure you want to change the base?
Changes from 2 commits
27e33fe
80283fa
5a5ad22
16eca2c
b2113a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
node_modules | ||
npm-debug.log | ||
test/fixtures/README.md | ||
test/fixtures/not-found.txt | ||
test/fixtures/not-found.txt | ||
.idea |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "cradle", | ||
"version": "0.6.6", | ||
"version": "0.6.7", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't bump versions in a pull-request. You're making a decision for the author that might be incorrect. |
||
"description": "the high-level, caching, CouchDB library", | ||
"url": "http://cloudhead.io/cradle", | ||
"keywords": ["couchdb", "database", "couch"], | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,6 +71,22 @@ function shouldQueryCouch(name) { | |
}, | ||
"creates a new document (201)": macros.status(201) | ||
}, | ||
"with indexes as root node" : { | ||
topic: function (db) { | ||
db.save('_design/search_couch_lucene', { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is this view defined? It should be seeded before querying. I don't know much about Lucene + CouchDB There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You mean search_view ? that is misleading from my part.It is the name og the exact search index |
||
indexes: { | ||
search_view:{ | ||
index: function(doc){index('default', doc.name); | ||
} | ||
} | ||
} | ||
}, this.callback); | ||
}, | ||
"creates a new document (201)": macros.status(201), | ||
"returns the revision": function (res) { | ||
assert.ok(res.rev); | ||
} | ||
}, | ||
"with a '_design' id": { | ||
topic: function (db) { | ||
db.save('_design/horses', { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to harp on this, but the whitespace here is wrong. Cradle mostly follows my StyleGuide except that it uses 4-space soft indents (instead of 2-space soft indents).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh Ii have the habit of using ide reformatting. Will fix