List of usage examples for org.apache.solr.schema SchemaField storeTermPositions
public boolean storeTermPositions()
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(/*from w w w . j a va 2 s. com*/ "Solr will use Highlighter instead of FastVectorHighlighter because {} field does not store TermPositions and TermOffsets.", fieldName); } return termPosOff; }