List of usage examples for org.apache.solr.common.params SolrParams getFieldBool
public boolean getFieldBool(String field, String param, boolean def)
From source file:com.o19s.solr.swan.highlight.SwanHighlighter.java
License:Apache License
private boolean useFastVectorHighlighter(SolrParams params, IndexSchema schema, String fieldName) { SchemaField schemaField = schema.getFieldOrNull(fieldName); if (schemaField == null) return false; boolean useFvhParam = params.getFieldBool(fieldName, HighlightParams.USE_FVH, false); if (!useFvhParam) return false; boolean termPosOff = schemaField.storeTermPositions() && schemaField.storeTermOffsets(); if (!termPosOff) { log.warn(/* w w w . j av a2s.co m*/ "Solr will use Highlighter instead of FastVectorHighlighter because {} field does not store TermPositions and TermOffsets.", fieldName); } return termPosOff; }