incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <robert.new...@gmail.com>
Subject Re: Help with couchdb-lucene
Date Sun, 29 Nov 2009 11:47:07 GMT
You might be getting this message because there are no documents in
the index at all. The 0.4 code cannot distinguish between an empty
index and one that does not exist. Ensure that you have one document
with a "name" field, and I also suggest wrapping the call to add in a
guard clause;

if (doc.name) {
  ret.add(doc.name);
}

B.

On Sat, Nov 28, 2009 at 2:31 PM, Smrchy <smrchy@gmail.com> wrote:
> I've got a lucene directory that contains some files but they are really
> small, so it seems not much was indexed. There are no errors in the
> couchdb-lucene.log and i get this in my couch.log (in debug mode):
>
> [Sat, 28 Nov 2009 14:27:46 GMT] [info] [<0.1.0>] Apache CouchDB has started
> on http://192.168.11.95:5984/
>
> [Sat, 28 Nov 2009 14:27:55 GMT] [debug] [<0.67.0>] 'GET'
> /database/_fti/lucene/by_name?q=Peter {1,1}
> Headers:
> [{'Accept',"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
>          {'Accept-Charset',"ISO-8859-1,utf-8;q=0.7,*;q=0.7"},
>          {'Accept-Encoding',"gzip,deflate"},
>          {'Accept-Language',"en-us,en;q=0.5"},
>          {'Connection',"keep-alive"},
>          {'Host',"192.168.11.95:5984"},
>          {'Keep-Alive',"300"},
>          {'User-Agent',"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6;
> en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 GTB6"}]
>
> [Sat, 28 Nov 2009 14:27:55 GMT] [debug] [<0.67.0>] OAuth Params:
> [{"q","Peter"}]
>
> [Sat, 28 Nov 2009 14:27:55 GMT] [info] [<0.85.0>] EXTERNAL: Starting process
> for: fti
>
> [Sat, 28 Nov 2009 14:27:55 GMT] [info] [<0.85.0>] COMMAND: /usr/bin/java
> -jar /etc/couchdb/couchdb-lucene-0.4-jar-with-dependencies.jar -search
>
> [Sat, 28 Nov 2009 14:27:56 GMT] [info] [<0.67.0>] 192.168.11.240 - - 'GET'
> /database/_fti/lucene/by_name?q=Peter 400
>
> [Sat, 28 Nov 2009 14:27:56 GMT] [debug] [<0.86.0>] OS Proc: Unknown info:
> {#Port<0.1016>,
>
> {data,{eol,<<"{\"code\":200,\"json\":{\"q\":\"default:peter\",\"etag\":\"1253b2ba04f\",\"view_sig\":\"\",\"skip\":0,\"limit\":25,\"total_rows\":0,\"search_duration\":5,\"fetch_duration\":0,\"rows\":[]},\"headers\":{\"Content-Type\":\"text/plain;charset=utf-8\",\"Cache-Control\":\"max-age=5\",\"ETag\":\"1253b2ba04f\"}}">>}}}
>
>
> I still get a .../lucene/by_name is not a valid view
>
> when i call it.
>
> Hope this helps
>
> On Sat, Nov 28, 2009 at 2:48 PM, Robert Newson <robert.newson@gmail.com>wrote:
>
>> Verify that you've hooked up the indexer (under update_notification)
>> and verify that it has built indexes (you should find a directory
>> called 'lucene').
>>
>> Also check both the couchdb.log and couchdb-lucene.log for errors.
>>
>> B.
>>
>> On Sat, Nov 28, 2009 at 1:38 PM, Smrchy <smrchy@gmail.com> wrote:
>> > Hi,
>> >
>> > i don't know what i'm missing - maybe someone can push me in the right
>> > direction?
>> >
>> > I installed couchdb-lucene 0.4 and couchdb seems to start without errors.
>> >
>> > I created a document:
>> >
>> > {
>> >   "_id": "_design/lucene",
>> >   "_rev": "2-f7d29646a16db961903f7d7b73fe1d77",
>> >   "fulltext": {
>> >       "by_name": {
>> >           "index": "function(doc) { var ret=new Document(); ret.add(
>> > doc.name); return ret }"
>> >       }
>> >   }
>> > }
>> >
>> > I got lots of documents with doc.name = "somename" and some other fields
>> in
>> > the database.
>> >
>> > Now whatever i do i can't query a document.
>> >
>> > I either get "database/lucene/by_name is not a valid view" with this
>> query:
>> > http://127.0.0.1:5984/database/_fti/lucene/by_name?q=Peter
>> >
>> > The above is the only design document i got in the db so far. Do i need
>> > another one?
>> >
>> > Some help would be appreciated :)
>> >
>> > Thx
>> > Patrick
>> >
>>
>

Mime
View raw message