incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From km <srikrishnamo...@gmail.com>
Subject couchdb-lucene fulltextsearch
Date Sat, 13 Feb 2010 16:48:25 GMT
Hi all,
I am working with couchdb v0.10.0 + couchdb-lucene v0.4
I have a  design document (from the docs) for a couchdb database with
fulltext search indexes

{
  "_id":"_design/lucene",
  "_rev":" some rev id ... ",

  "fulltext":{
      "by_name":{
      "index":"function(doc){var rec = new Document(); rec.add(doc.name);
return rec;}"
      }
  }
}

now using this, i query
curl http://localhost:5984/mydb/_fti/lucene/by_name?q='john'

so far so good and I retrive one record like this
 {"q":"john","etag":"126bc75d913","view_sig":"ffe984900a27786e627594907565e3aa","skip":0,"limit":25,"total_rows":1,"search_duration":0,"fetch_duration":0,"rows":[{"id":"0a08997ba60937ce49ed6b9b4eb11369","score":8.580954551696777}]}

But how  do I retrieve  some of keys and their values from the documents
matched ?
Ofcourse I can attach an "include_docs=true" to the query param, But that
returns entire document to the client which is not desired - (big documents)
.


do I need to have a map function for this ? and where should i place it ?
pls enlighten.

thanks
Krishna
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message