couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Anderson" <jch...@mfdz.com>
Subject Re: indexing design document
Date Sat, 29 Mar 2008 23:31:03 GMT
On Sat, Mar 29, 2008 at 3:40 PM, Søren Hilmer <sh@widetrail.dk> wrote:
> Have I missed something?
>  I am trying to put the below design document into couch, but it complaints
>  with an error saying: Bad special document member: _fulltext_options
>
>  Is _fulltext_options something that needs to be added into couch itself? If so
>  I have missed that requirement in our discussion.
>
>  {
>   "_id":"_design/fulltextsearch",
>   "_rev":"123",
>   "_fulltext_options": {
>     "views": {
>       "names" : {"index":"view-value", "return":"document"},
>       "cities": {"index":"view-key", "return":"view-value"}
>     }
>   }
>  }
>
>  Have fun
>   Søren
>

Søren,

It's awesome that you are digging into this! I was thinking about the
fulltext_options schema, and it seems it could be simplified a little
by restricting the options for the "return" value to either "document"
or "view". Otherwise surely people will also want to return the
view-key after indexing the value, or other permutations. If it's just
the view row (key and value, as returned from a standard view query),
or the whole document, then any code which is designed to work with
standard CouchDB queries will be able to consume fulltext results as
well.

Can't wait to play with it.

Chris


-- 
Chris Anderson
http://jchris.mfdz.com

Mime
View raw message