couchdb-user mailing list archives

You are attempting to sort on a field with text in, which Lucene does
not support. You can prevent this exception by not doing that. :)
Specifically, you've done something like ret.add(doc.subject,
{"field":"subject"}) and then ?sort=subject
Assuming I've guessed correctly, you can achieve this effect using the
keyword analyzer (which will not break your 'subject' field into
multiple tokens); add {"analyzer":"keyword"} when indexing that field.
Note that the full value of 'subject' will be indexed, so you might
wish to truncate it.
B.
On Mon, May 17, 2010 at 4:29 AM, Jochen Kempf <jochenkempf@gmail.com> wrote:
> Hi,
>
> how can I prevent the following exception?
>
> java.lang.RuntimeException: there are more terms than documents in field
> "job", but it's impossible to sort on tokenized fields
>