On Fri, Sep 26, 2008 at 4:54 AM, Jaap van der Plas <[EMAIL PROTECTED]> wrote:
> Greetings Jan,
>
> the goal is not so much to allow full-text search on the documents
> fields, as to be able to retrieve records based any set of field names
> with specific values (or perhaps ranges.) Basically, what the 'where'
> clause can do in SQL.

You could do a view like:

function(doc) {
  var f;
  for (f in doc) {
    emit([f, doc[f]], null);
  }
}

This would emit a key based on the name and value of every field in a
document. You might do well to optimize it by avoiding the fields that
start with "_" or other fields you don't care to index. You'll use a
lot of disc this way, but assuming you know at query time which field
you are interested in, it should be very fast to lookup keys and key
ranges within a given field.


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

Reply via email to