You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Bruce Atherton <br...@callenish.com> on 2012/10/26 03:07:35 UTC
Yet Another couchdb-lucene question
I've almost got couchdb-lucene to work, but I must be missing something
because I'm not getting indexes to build. Here is the behaviour I am seeing:
Hitting the URL
http://localhost:5984/_fti/local/testdb/_design/lucene/by_type?q=test
sends back:
{"reason":"no_such_view","code":400}
The view does in fact exist. The couchdb-lucene server then prints out:
INFO [testdb] Indexing from update_seq start
Despite the message, though, nothing shows up in the indexes directory.
Nor does the couchdb-lucene log say anything interesting. It just gives
the same INFO message. The only other log message I get is when I change
the design document in CouchDB.
_design/lucene contains:
{
"_id": "_design/lucene",
"_rev": "6-9b3a6fb41e455dfe88393ba9c5104a25",
"fulltext": "{'by_type': {'index': 'function(doc) { var ret =
new Document(); ret.add(doc.type); return ret; }' } }"
}
http://localhost:5984/ returns:
{"couchdb":"Welcome","version":"1.3.0a-272d641-git","vendor":{"version":"1.3.0a-272d641-git","name":"The
Apache Software Foundation"}}
and http://localhost:5985/ (and http://localhost:5984/_fti/local) returns:
{"couchdb-lucene":"Welcome","version":"0.9.0-SNAPSHOT"}
I googled for a while but didn't see anything that helped. Am I missing
something obvious or just too much on the bleeding edge? Any help
appreciated. Thanks.
unsubscribed 3 times - Re: Yet Another couchdb-lucene question
Posted by gerd <ru...@yandex.ru>.
Dear administrator,
i unsubscribed three times, but still getting your mails.
Am 30.10.2012 um 01:09 schrieb Robert Newson <rn...@apache.org>:
> I've always used couchapp to push .js files correctly into ddoc.
>
> On 30 October 2012 00:03, Bruce Atherton <br...@callenish.com> wrote:
>> Ok, I figured out how I created this error, and it leads me to another
>> question.
>>
>> The problem is that I tried to add the "fulltext" entry to my view using
>> kanso and the modules package by writing a fulltext.js file that contained
>> the by_type index. Pushing this with kanso automatically adds quote marks
>> around the value, even if I don't want it to.
>>
>> My question is, is there a way to define this entry in my design document as
>> a text file, and then use kanso to push it to my _design/application
>> document in a way that is recognized by couchdb_lucene? Create a separate
>> _design/lucene document as an attachment (without screwing up the embedded
>> slash in the name)? Something else? Or should I use a different upload
>> mechanism than kanso?
>>
>>
>> On 12-10-26 12:07 PM, Bruce Atherton wrote:
>>>
>>> Exactly bang on. I'm not sure how I made that obvious mistake. Thank you
>>> so much.
>>>
>>> On 12-10-26 01:59 AM, Robert Newson wrote:
>>>>
>>>> "fulltext": "{'by_type': {'index': 'function(doc) { var ret = new
>>>> Document(); ret.add(doc.type); return ret; }' } }"
>>>>
>>>> is wrong;
>>>>
>>>> "fulltext": {"by_type": {"index": "function(doc) { var ret = new
>>>> Document(); ret.add(doc.type); return ret; }'"} }
>>>>
>>>> is right. You packed everything into a string, which confuses
>>>> couchdb-lucene as it expects an object.
>>>>
>>>> B.
>>>>
>>>>
>>>
>>
>
Re: Yet Another couchdb-lucene question
Posted by Robert Newson <rn...@apache.org>.
I've always used couchapp to push .js files correctly into ddoc.
On 30 October 2012 00:03, Bruce Atherton <br...@callenish.com> wrote:
> Ok, I figured out how I created this error, and it leads me to another
> question.
>
> The problem is that I tried to add the "fulltext" entry to my view using
> kanso and the modules package by writing a fulltext.js file that contained
> the by_type index. Pushing this with kanso automatically adds quote marks
> around the value, even if I don't want it to.
>
> My question is, is there a way to define this entry in my design document as
> a text file, and then use kanso to push it to my _design/application
> document in a way that is recognized by couchdb_lucene? Create a separate
> _design/lucene document as an attachment (without screwing up the embedded
> slash in the name)? Something else? Or should I use a different upload
> mechanism than kanso?
>
>
> On 12-10-26 12:07 PM, Bruce Atherton wrote:
>>
>> Exactly bang on. I'm not sure how I made that obvious mistake. Thank you
>> so much.
>>
>> On 12-10-26 01:59 AM, Robert Newson wrote:
>>>
>>> "fulltext": "{'by_type': {'index': 'function(doc) { var ret = new
>>> Document(); ret.add(doc.type); return ret; }' } }"
>>>
>>> is wrong;
>>>
>>> "fulltext": {"by_type": {"index": "function(doc) { var ret = new
>>> Document(); ret.add(doc.type); return ret; }'"} }
>>>
>>> is right. You packed everything into a string, which confuses
>>> couchdb-lucene as it expects an object.
>>>
>>> B.
>>>
>>>
>>
>
Re: Yet Another couchdb-lucene question
Posted by Bruce Atherton <br...@callenish.com>.
Ok, I figured out how I created this error, and it leads me to another
question.
The problem is that I tried to add the "fulltext" entry to my view using
kanso and the modules package by writing a fulltext.js file that
contained the by_type index. Pushing this with kanso automatically adds
quote marks around the value, even if I don't want it to.
My question is, is there a way to define this entry in my design
document as a text file, and then use kanso to push it to my
_design/application document in a way that is recognized by
couchdb_lucene? Create a separate _design/lucene document as an
attachment (without screwing up the embedded slash in the name)?
Something else? Or should I use a different upload mechanism than kanso?
On 12-10-26 12:07 PM, Bruce Atherton wrote:
> Exactly bang on. I'm not sure how I made that obvious mistake. Thank
> you so much.
>
> On 12-10-26 01:59 AM, Robert Newson wrote:
>> "fulltext": "{'by_type': {'index': 'function(doc) { var ret = new
>> Document(); ret.add(doc.type); return ret; }' } }"
>>
>> is wrong;
>>
>> "fulltext": {"by_type": {"index": "function(doc) { var ret = new
>> Document(); ret.add(doc.type); return ret; }'"} }
>>
>> is right. You packed everything into a string, which confuses
>> couchdb-lucene as it expects an object.
>>
>> B.
>>
>>
>
Re: Yet Another couchdb-lucene question
Posted by Bruce Atherton <br...@callenish.com>.
Exactly bang on. I'm not sure how I made that obvious mistake. Thank you
so much.
On 12-10-26 01:59 AM, Robert Newson wrote:
> "fulltext": "{'by_type': {'index': 'function(doc) { var ret = new
> Document(); ret.add(doc.type); return ret; }' } }"
>
> is wrong;
>
> "fulltext": {"by_type": {"index": "function(doc) { var ret = new
> Document(); ret.add(doc.type); return ret; }'"} }
>
> is right. You packed everything into a string, which confuses
> couchdb-lucene as it expects an object.
>
> B.
>
>
Re: Yet Another couchdb-lucene question
Posted by Robert Newson <rn...@apache.org>.
"fulltext": "{'by_type': {'index': 'function(doc) { var ret = new
Document(); ret.add(doc.type); return ret; }' } }"
is wrong;
"fulltext": {"by_type": {"index": "function(doc) { var ret = new
Document(); ret.add(doc.type); return ret; }'"} }
is right. You packed everything into a string, which confuses
couchdb-lucene as it expects an object.
B.
On 26 October 2012 02:07, Bruce Atherton <br...@callenish.com> wrote:
> I've almost got couchdb-lucene to work, but I must be missing something
> because I'm not getting indexes to build. Here is the behaviour I am seeing:
>
> Hitting the URL
> http://localhost:5984/_fti/local/testdb/_design/lucene/by_type?q=test sends
> back:
>
> {"reason":"no_such_view","code":400}
>
> The view does in fact exist. The couchdb-lucene server then prints out:
>
> INFO [testdb] Indexing from update_seq start
>
> Despite the message, though, nothing shows up in the indexes directory. Nor
> does the couchdb-lucene log say anything interesting. It just gives the same
> INFO message. The only other log message I get is when I change the design
> document in CouchDB.
>
> _design/lucene contains:
>
> {
> "_id": "_design/lucene",
> "_rev": "6-9b3a6fb41e455dfe88393ba9c5104a25",
> "fulltext": "{'by_type': {'index': 'function(doc) { var ret = new
> Document(); ret.add(doc.type); return ret; }' } }"
> }
>
> http://localhost:5984/ returns:
>
> {"couchdb":"Welcome","version":"1.3.0a-272d641-git","vendor":{"version":"1.3.0a-272d641-git","name":"The
> Apache Software Foundation"}}
>
> and http://localhost:5985/ (and http://localhost:5984/_fti/local) returns:
>
> {"couchdb-lucene":"Welcome","version":"0.9.0-SNAPSHOT"}
>
> I googled for a while but didn't see anything that helped. Am I missing
> something obvious or just too much on the bleeding edge? Any help
> appreciated. Thanks.