-
Notifications
You must be signed in to change notification settings - Fork 147
CouchDB 2.1.x and Lucene #265
Comments
Ahhhh, now I see, after digging into some of the other issues I now get that with curl http://localhost:5985/local/testDb/_design/search/by_title?q=title:captain ...with then gets me back... {
"q": "title:captain",
"fetch_duration": 0,
"total_rows": 3,
"limit": 25,
"search_duration": 0,
"etag": "5633589417da1",
"skip": 0,
"rows": [
{
"score": 0.9384178519248962,
"id": "a32629854547e9e3b50bdd75fd00df8c",
"fields": {
"title": "Captain Hector Barbossa"
}
},
{
"score": 0.9384178519248962,
"id": "a32629854547e9e3b50bdd75fd00cff7",
"fields": {
"title": "Captain Jack Sparrow"
}
},
{
"score": 0.810458242893219,
"id": "a32629854547e9e3b50bdd75fd00ebff",
"fields": {
"title": "Captain John \"Calico Jack\" Rackham"
}
}
]
} I think it could be well worth adding a note to the README to put this detail in an easier to find place, would have saved me a lot of time. Still a very cool CouchDB addition. 👍 |
Could you please send me your config? |
@huyentk happy to help... can you post the content of the view |
@Crispy1975 Oh I typed error word in my view so that it didn't work, after I fixed, it works. |
@Crispy1975 : Thank you for the help with the curl that needs to be used for lucene in 2.0. I've tried and it seems none of the fields are getting indexed in my case. An example doc:
returns zero doc_count and empty fields
Not sure what would I be missing here |
It was my bad that I had installed the earlier version of lucene and obviously it didn't work out. Sorry, and I'm providing the link here for the couch2.0 compatible lucene 2.0.0 version |
I had the same problem and Crispy1975's post provided the solution. If, from couchdb 2.0 onwards, the url has the format http://localhost:5985/local/testDb/_design/search/by_title?q=title:captain this should be added to the README. This would have saved me an hour. Should I do the edit and submit a PR for this? |
@leforestier a PR would be welcomed. It's not so much that the url has changed, it's that you now have to call couchdb-lucene directly. the various schemes for proxying through http 2.0 no longer work. |
Thank Google, I found this thread. I was tearing my hairs out. The README is downright wrong, actually. It states that the URL format is:
Port 5984, of course, is the default port of CouchDB!!! I bet 9 out of 10 people would not know that we need to query Lucene directly when seeing 5984. |
Hi, I've been trying to get
couchdb-lucene
running and have hit a bit of a brick wall. I've followed the README, have built couchdb-lucene and have it running, also added the relevant_fti
handler into the correct section of the CouchDBlocal.ini
(shows in Fauxton). However once rigging the required index in CouchDB I get no indexing activity (empty Lucene indexes folder), and if I try and hit the_fti
endpoint I get back the standard CouchDB error of{"error":"not_found","reason":"Database does not exist."}
. This suggests the proxying isn't working (also Lucene logs are empty). Here is some system info...$ java -version openjdk version "9.0.4" OpenJDK Runtime Environment (build 9.0.4+12-Ubuntu-2ubuntu3) OpenJDK 64-Bit Server VM (build 9.0.4+12-Ubuntu-2ubuntu3, mixed mode)
After saving a few docs in CouchDB, trying to hit the following endpoint:
This CouchDB doc I would expect to be indexed is:
As far as I can tell everything is in order, before I destroy everything and start again was wondering if there is something silly that I've missed?
Thanks.
The text was updated successfully, but these errors were encountered: