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} "
}
}
}
Sounds like you need to open a feature request to CouchDB-Lucene: https://github.com/rnewson/couchdb-lucene/issues — it doesn’t look like it has that feature enabled yet, if it is at all possible.