Hi

I am using the TermsComponent in my solr config like this to deal with queries about terms in the index:

--------------
<searchComponent name="terms" class="solr.TermsComponent"/>

  <!-- A request handler for demonstrating the terms component -->
  <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
     <lst name="defaults">
      <bool name="terms">true</bool>
      <bool name="distrib">false</bool>
    </lst>
    <arr name="components">
      <str>terms</str>
    </arr>
  </requestHandler>
-----------


For example, I want to fetch any *terms* containing "surface defects". Using solr I can do this:

http://localhost:8983/solr/core1/terms?terms.fl=content&terms.regex=^(.*?(\bsurface%20defects\b)[^$]*)$&terms.sort=count&terms.limit=10000


So my question is, how can I achieve the same by using the Lucene API, not solr? I looked into the org.apache.solr.handler.component.TermsComponent class but it is not very obvious for me.

Any suggestions much appreciated!


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to