Sorry for the Chinese characters. But basically, the * Error * part is only printed when the results of couchdb-lucene, cannot be found in the database. There is actually a pattern in the error. These ids has one (and only one) certain character being repeated once in the non-latin part. 3 errors contained 3 different "repeated characters". The error always involved this particular id. It's not random.

If you look closely, the script writes 10 documents that are all named alike. But there's only 1 id that's always failing. I tried this many times.

The script is very close to my development situation where I first discovered this problem. I tried a few combinations, it appears that the document id is the problem, but not the searching (indexing?) itself.

With all the combination I tried, the failing situations (such as the one the above script reproduced) only occur in less than 5% of all situations. Not all non-latin character combinations are failing, only a small portion of them. And they don't have to be this long. But so far, I cannot reproduce this with latin character doc ids.

I'm wondering if this is a bug or something I didn't do right. I'm not that familiar with lucene, I'm wondering what module should I look into to find the cause of this problem?