You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Mark Miller <ma...@gmail.com> on 2007/01/02 20:52:50 UTC

Searching an empty index with a sort field specified throws a runtime exception

Subject says it all. Just wondering if this behavior is acceptable to
everyone and I should code around it, or if we might get a fix. The
exception is thrown when the sort field is examined for what type it is
(type set to auto). Lucene throws an exception saying that  the field is
empty and so the type cannot be inferred. The field is empty because the
index is empty.  Perhaps there is an  easy  fix short of a Lucene patch as
well. Little help?

- Mark

Re: Searching an empty index with a sort field specified throws a runtime exception

Posted by Yonik Seeley <yo...@apache.org>.
On 1/2/07, Mark Miller <ma...@gmail.com> wrote:
> Subject says it all. Just wondering if this behavior is acceptable to
> everyone and I should code around it, or if we might get a fix. The
> exception is thrown when the sort field is examined for what type it is
> (type set to auto). Lucene throws an exception saying that  the field is
> empty and so the type cannot be inferred. The field is empty because the
> index is empty.  Perhaps there is an  easy  fix short of a Lucene patch as
> well. Little help?

I remember fixing this for every sort type except "auto", which I
don't recommend using since it's very error prone.  No harm in fixing
it if someone wants to submit a patch though.


-Yonik
http://incubator.apache.org/solr Solr, the open-source Lucene search server

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org