List of usage examples for org.apache.solr.schema IndexSchema getSchemaName
public String getSchemaName()
From source file:uk.co.flax.biosolr.builders.AbstractFacetTreeBuilder.java
License:Apache License
protected void checkFieldsInSchema(SolrIndexSearcher searcher, Collection<String> fields) throws SolrException { IndexSchema schema = searcher.getSchema(); for (String field : fields) { SchemaField sField = schema.getField(field); if (sField == null) { throw new SolrException(ErrorCode.BAD_REQUEST, "\"" + field + "\" is not in schema " + schema.getSchemaName()); }//w w w . j a v a 2 s . c o m } }