only search for fields solr knows about (otherwise you could get NPE for range query) -- also searching for non-indexed fields is useless.

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@541824 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan McKinley 2007-05-25 23:47:29 +00:00
parent 6b26f007b2
commit 5ea9310021
1 changed files with 1 additions and 1 deletions

View File

@ -293,7 +293,7 @@ public class LukeRequestHandler extends RequestHandlerBase
f.add( "schema", getFieldFlags( sfield ) );
// If numTerms==0, the call is just asking for a quick field list
if( ttinfo != null ) {
if( ttinfo != null && sfield != null && sfield.indexed() ) {
Query q = qp.parse( fieldName+":[* TO *]" );
int docCount = searcher.numDocs( q, matchAllDocs );
if( docCount > 0 ) {