You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Wolfgang issovits <wo...@gmail.com> on 2009/07/13 13:27:23 UTC

problems with couchb-lucene

Hello!

I've tried to set up couchdb with lucene for a while with no success so 
far. I created a "_design/lucene" document for indexing which looks like 
this:

{
    "_id": "_design/lucene",
    "_rev": "5-2604847086",
    "fulltext": {
        "by_name": {
            "defaults": {
                "store": "yes"
            },
            "index": "function(doc) { var ret=new Document(); 
ret.add(doc.name); return ret }"
        }
    }
}

In addition I created a "_design/views" document:

{
    "_id": "_design/views",
    "_rev": "20-662305778",
    "language": "javascript",
    "views": {
        "all_signals": {
            "map": "function(doc) {\n  if (doc.type == 'signal')\n 
emit(doc.name, doc._id);\n}"
        }
    }
}

Now i tried to call this view with a query. I tried several different 
urls with no success so far. All I get are different errors... ("Extra 
path info in request", "test/luence/all_signals is not a valid view", 
"No view name in path")

Can someone tell me the right way to call a view with a query parameter?
Thanks in advance.

kind regards,
Wolfgang

Re: problems with couchb-lucene

Posted by Robert Newson <ro...@gmail.com>.
Hi,

You've probably realized by now that couchdb views and couchdb-lucene
indexes are completely separate. It is not currently possible to use
couchdb-lucene on the output of a couch view.

B.

On Mon, Jul 13, 2009 at 2:38 PM, Wolfgang
issovits<wo...@gmail.com> wrote:
> Thanks, your tip worked just fine. I was just a little bit confused by
> indexing and views and _design documents.... It's all so different with this
> document based database but I will figure it out ;)
>
> kind regards,
> Wolfgang
>
>
> Manolo Padron Martinez wrote:
>>
>> Hi:
>>
>> As I know
>>
>> http://localhost:5984/databasename/_fti/lucene/by_name/?q=docname:something
>>
>> Regards from Canary Islands
>>
>> Manuel Padrón Martínez
>>
>> On Mon, Jul 13, 2009 at 12:27 PM, Wolfgang
>> issovits<wo...@gmail.com> wrote:
>>>
>>> Hello!
>>>
>>> I've tried to set up couchdb with lucene for a while with no success so
>>> far.
>>> I created a "_design/lucene" document for indexing which looks like this:
>>>
>>> {
>>>  "_id": "_design/lucene",
>>>  "_rev": "5-2604847086",
>>>  "fulltext": {
>>>      "by_name": {
>>>          "defaults": {
>>>              "store": "yes"
>>>          },
>>>          "index": "function(doc) { var ret=new Document();
>>> ret.add(doc.name); return ret }"
>>>      }
>>>  }
>>> }
>>>
>>> In addition I created a "_design/views" document:
>>>
>>> {
>>>  "_id": "_design/views",
>>>  "_rev": "20-662305778",
>>>  "language": "javascript",
>>>  "views": {
>>>      "all_signals": {
>>>          "map": "function(doc) {\n  if (doc.type == 'signal')\n
>>> emit(doc.name, doc._id);\n}"
>>>      }
>>>  }
>>> }
>>>
>>> Now i tried to call this view with a query. I tried several different
>>> urls
>>> with no success so far. All I get are different errors... ("Extra path
>>> info
>>> in request", "test/luence/all_signals is not a valid view", "No view name
>>> in
>>> path")
>>>
>>> Can someone tell me the right way to call a view with a query parameter?
>>> Thanks in advance.
>>>
>>> kind regards,
>>> Wolfgang
>>>
>
>

Re: problems with couchb-lucene

Posted by Wolfgang issovits <wo...@gmail.com>.
Thanks, your tip worked just fine. I was just a little bit confused by 
indexing and views and _design documents.... It's all so different with 
this document based database but I will figure it out ;)

kind regards,
Wolfgang


Manolo Padron Martinez wrote:
> Hi:
> 
> As I know
> http://localhost:5984/databasename/_fti/lucene/by_name/?q=docname:something
> 
> Regards from Canary Islands
> 
> Manuel Padrón Martínez
> 
> On Mon, Jul 13, 2009 at 12:27 PM, Wolfgang
> issovits<wo...@gmail.com> wrote:
>> Hello!
>>
>> I've tried to set up couchdb with lucene for a while with no success so far.
>> I created a "_design/lucene" document for indexing which looks like this:
>>
>> {
>>   "_id": "_design/lucene",
>>   "_rev": "5-2604847086",
>>   "fulltext": {
>>       "by_name": {
>>           "defaults": {
>>               "store": "yes"
>>           },
>>           "index": "function(doc) { var ret=new Document();
>> ret.add(doc.name); return ret }"
>>       }
>>   }
>> }
>>
>> In addition I created a "_design/views" document:
>>
>> {
>>   "_id": "_design/views",
>>   "_rev": "20-662305778",
>>   "language": "javascript",
>>   "views": {
>>       "all_signals": {
>>           "map": "function(doc) {\n  if (doc.type == 'signal')\n
>> emit(doc.name, doc._id);\n}"
>>       }
>>   }
>> }
>>
>> Now i tried to call this view with a query. I tried several different urls
>> with no success so far. All I get are different errors... ("Extra path info
>> in request", "test/luence/all_signals is not a valid view", "No view name in
>> path")
>>
>> Can someone tell me the right way to call a view with a query parameter?
>> Thanks in advance.
>>
>> kind regards,
>> Wolfgang
>>


Re: problems with couchb-lucene

Posted by Manolo Padron Martinez <ma...@gmail.com>.
Hi:

As I know
http://localhost:5984/databasename/_fti/lucene/by_name/?q=docname:something

Regards from Canary Islands

Manuel Padrón Martínez

On Mon, Jul 13, 2009 at 12:27 PM, Wolfgang
issovits<wo...@gmail.com> wrote:
> Hello!
>
> I've tried to set up couchdb with lucene for a while with no success so far.
> I created a "_design/lucene" document for indexing which looks like this:
>
> {
>   "_id": "_design/lucene",
>   "_rev": "5-2604847086",
>   "fulltext": {
>       "by_name": {
>           "defaults": {
>               "store": "yes"
>           },
>           "index": "function(doc) { var ret=new Document();
> ret.add(doc.name); return ret }"
>       }
>   }
> }
>
> In addition I created a "_design/views" document:
>
> {
>   "_id": "_design/views",
>   "_rev": "20-662305778",
>   "language": "javascript",
>   "views": {
>       "all_signals": {
>           "map": "function(doc) {\n  if (doc.type == 'signal')\n
> emit(doc.name, doc._id);\n}"
>       }
>   }
> }
>
> Now i tried to call this view with a query. I tried several different urls
> with no success so far. All I get are different errors... ("Extra path info
> in request", "test/luence/all_signals is not a valid view", "No view name in
> path")
>
> Can someone tell me the right way to call a view with a query parameter?
> Thanks in advance.
>
> kind regards,
> Wolfgang
>

RE: problems with couchb-lucene

Posted by Nils Breunese <N....@vpro.nl>.
See the examples section at http://github.com/rnewson/couchdb-lucene

Nils.
________________________________________
Van: Wolfgang issovits [wolfgang.issovits@gmail.com]
Verzonden: maandag 13 juli 2009 13:27
Aan: user@couchdb.apache.org
Onderwerp: problems with couchb-lucene

Hello!

I've tried to set up couchdb with lucene for a while with no success so
far. I created a "_design/lucene" document for indexing which looks like
this:

{
    "_id": "_design/lucene",
    "_rev": "5-2604847086",
    "fulltext": {
        "by_name": {
            "defaults": {
                "store": "yes"
            },
            "index": "function(doc) { var ret=new Document();
ret.add(doc.name); return ret }"
        }
    }
}

In addition I created a "_design/views" document:

{
    "_id": "_design/views",
    "_rev": "20-662305778",
    "language": "javascript",
    "views": {
        "all_signals": {
            "map": "function(doc) {\n  if (doc.type == 'signal')\n
emit(doc.name, doc._id);\n}"
        }
    }
}

Now i tried to call this view with a query. I tried several different
urls with no success so far. All I get are different errors... ("Extra
path info in request", "test/luence/all_signals is not a valid view",
"No view name in path")

Can someone tell me the right way to call a view with a query parameter?
Thanks in advance.

kind regards,
Wolfgang

De informatie vervat in deze  e-mail en meegezonden bijlagen is uitsluitend bedoeld voor gebruik door de geadresseerde en kan vertrouwelijke informatie bevatten. Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking van deze informatie aan derden is voorbehouden aan geadresseerde. De VPRO staat niet in voor de juiste en volledige overbrenging van de inhoud van een verzonden e-mail, noch voor tijdige ontvangst daarvan.