org.apache.solr.handler.component

Class TermVectorComponent

  • All Implemented Interfaces:
    SolrInfoMBean, NamedListInitializedPlugin, SolrCoreAware


    public class TermVectorComponent
    extends SearchComponent
    implements SolrCoreAware
    Return term vectors for the documents in a query result set.

    Info available: term, frequency, position, offset, payloads, IDF.

    Note Returning IDF can be expensive.

     <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
     
     <requestHandler name="/terms" class="solr.SearchHandler">
       <lst name="defaults">
         <bool name="tv">true</bool>
       </lst>
       <arr name="last-component">
         <str>tvComponent</str>
       </arr>
     </requestHandler>