SolrSearchHandler Class
Represents a default configuration of a request to a Solr search handler.
Methods
buildPayload
-
adapter -
the -
type -
operation -
data
<p>Prepares the <a href="../classes/SolrRequestHandler.html#property_data" class="crosslink">data</a> and optinally adjusts the <a href="../classes/SolrRequestHandler.html#property_path" class="crosslink">path</a> properties to send to Solr as a querystring or in an HTTP POST request body.</p> <p>This method mutates the state of the instance it is invoked on and has no return value.</p>
Parameters:
-
adapterSolrAdapter<p>the adapter invoking this method</p>
-
theDS.Store<p>store related to the type and data</p>
-
typesubclass of DS.Model<p>the type corresponding to the operation</p>
-
operationString<p>the operation e.g. 'find', 'updateRecord', etc.</p>
-
dataObject<p>the ID(s), query or snapshot payload to prepare.</p>
buildSolrQuery
-
adapter -
type -
operation -
query
Builds a Solr query to send in a search request. This method applies some defaults and converts idiomatic Ember query parameters to their Solr corollaries.
- Sets
wt=json - Converts
limittorows - Converts
offsettostart - Defaults to
q=*:*when no query is specified - Calls filterQueryForType
and sets
fqwhen a non-blank filter query is returned
Overrides of this method can return an object that includes
other query options. Multipe fq parameters (and others)
can be defined by using an array for the values:
App.ApplicationAdapter = SolrAdapter.extend({
buildSolrQuery: function(type, query) {
return {
fq: [
'type:' + type,
'public:true'
]
};
}
});
See QueryResponseWriter and CommonQueryParameters.
Parameters:
-
adapterSolrAdapterthe adapter invoking this method
-
typeString -
operationString -
queryObject
Returns:
data hash for ajax request
Properties
data
Object
<p>The data payload to send in the request, as a query string or as a JSON request body.</p>
Default: null
path
Unknown
Default: 'select'
type
Unknown
Default: `SolrHandlerType.Search`
