Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

Indexing doc._local_seq #195

Open
sameersegal opened this issue Jun 13, 2014 · 2 comments
Open

Indexing doc._local_seq #195

sameersegal opened this issue Jun 13, 2014 · 2 comments

Comments

@sameersegal
Copy link

CouchDB 1.6 has added the ability to pass _local_seq (or seq) of the doc to the view if the design-doc has options.local_seq = true. I want to use with couchdb-lucene but I am unable to make it work?

Here is the design doc:

{
   "_id": "_design/changes",
   "_rev": "5-e894a1ea6a6768acb22e6597425de4b2",
   "language": "javascript",
   "options": {
       "local_seq": true
   },
   "fulltext": {
       "replication": {
           "index": "function(doc) {\n  if(doc.context){\n\n    var ret = new Document();    \n    ret.add(doc.context,{field:'context',store:'yes'});\n    ret.add(doc._id,{field:'id',store:'yes',analyze:false});\n    ret.add(doc._rev,{field:'rev',store:'yes',analyze:false});\n    ret.add(doc._local_seq,{field:'seq',store:'yes',analyze:false});\n\n    return ret;\n  }\n}   "
       }
   }
}

I am happy to help in building this feature if some can point me to the relevant portion of the source code.

Best, Sameer

@rnewson
Copy link
Owner

rnewson commented Jun 13, 2014

the _local_seq option for views has been around much longer than couchdb 1.6, but couchdb-lucene does not support it. Patches are welcome, of course. I'd start by checking couchdb source code for the places where 'local_seq' occurs and then read DatabaseIndexer.java.

@sameersegal
Copy link
Author

Thanks - I'll work on it and get back to you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants