rnewson / couchdb-lucene

Enables full-text searching of CouchDB documents using Lucene
Apache License 2.0
769 stars 145 forks source link

Not working in case of adding into the same field more than once #252

Open alexchetv opened 7 years ago

alexchetv commented 7 years ago

If I try to use index function addind content into the same field

function(doc) {
  var result = new Document();
  result.add(doc.a, {"field":"a", "store":"yes"});
  result.add(doc.b, {"field":"a"});
  return result;
}

I get error {"code":500} and in couchdb-lucene.log I see java.io.IOException: Search timed out.

All works fine if we add into different fields:

function(doc) {
  var result = new Document();
  result.add(doc.a, {"field":"a", "store":"yes"});
  result.add(doc.b, {"field":"b"});
  return result;
}
rnewson commented 7 years ago

sorry for late reply. Hm, that really should work. Lucene should just combine them at indexing time (which might not be the effect you want, of course). Was there anything interesting in the log during indexing?