I have difficulties with the "/terms" request handler using Solr 4.2.0.
Using the web browser the following url returns the list of terms of the fieldName INDUSTRY
http://localhost:8983/solr/collection1/terms?terms.fl=INDUSTRY&terms.prefix=P&terms=true
On the other hand, the following query returns no terms:
http://localhost:8983/solr/collection1/select?qt=terms&terms.fl=INDUSTRY&terms.prefix=P&terms=true
My question is how can I use the "/terms" requestHandler via the "/select" requestHandler?
The log from Solr is the following (if it is of any help to you)
Apr 12, 2013 10:21:55 AM org.apache.solr.core.SolrCore execute
INFO: [collection1] webapp=/solr path=/terms params={terms.fl=INDUSTRY&terms=true&terms.prefix=P} status=0 QTime=5
Apr 12, 2013 10:22:09 AM org.apache.solr.core.SolrCore execute
INFO: [collection1] webapp=/solr path=/select params={terms.fl=INDUSTRY&terms=true&qt=terms&terms.prefix=P} hits=0 status=0 QTime=0
The following steps solve the above problem.
First, in solrconfig.xml you should remove the "/select" requestHandler and moreover set handleSelect to true.
<requestDispatcher handleSelect="true" >
Second, reboot Solr and the following query works:
http://localhost:8983/solr/collection1/select?qt=/terms&terms.fl=INDUSTRY&terms.prefix=P&terms=true
IMPORTANT: notice the "/terms" on the qt parameter, using "qt=terms" will not work..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With