couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: Yet Another couchdb-lucene question
Date Tue, 30 Oct 2012 00:09:11 GMT
I've always used couchapp to push .js files correctly into ddoc.

On 30 October 2012 00:03, Bruce Atherton <bruce@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.
>>>
>>>
>>
>

Mime
View raw message