mirror of https://github.com/apache/lucene.git
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:
parent
6b26f007b2
commit
5ea9310021
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in New Issue