lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ramzi Alqrainy <ramzi.alqra...@gmail.com>
Subject Re: Suggester on Dynamic fields
Date Wed, 22 Oct 2014 04:21:30 GMT
Use query() to have Solr search for results. You have to pass a SolrQuery
object that describes the query, and you will get back a QueryResponse (from
the org.apache.solr.client.solrj.response package).
SolrQuery has methods that make it easy to add parameters to choose a
request handler and send parameters to it. Here is a very simple example
that uses the default request handler and sets the q parameter:

<http://lucene.472066.n3.nabble.com/file/n4165288/1.png> 

To choose a different request handler, for example, just set the qt
parameter like this:

<http://lucene.472066.n3.nabble.com/file/n4165288/2.png> 

Once you have your SolrQuery set up, submit it with query():

<http://lucene.472066.n3.nabble.com/file/n4165288/3.png> 

The client makes a network connection and sends the query. Solr processes
the query, and the response is sent and parsed into a QueryResponse.

The QueryResponse is a collection of documents that satisfy the query
parameters. You can retrieve the documents directly with getResults() and
you can call other methods to find out information about highlighting or
facets.

<http://lucene.472066.n3.nabble.com/file/n4165288/4.png> 



--
View this message in context: http://lucene.472066.n3.nabble.com/Suggester-on-Dynamic-fields-tp4165270p4165288.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message