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:
-
adapter
SolrAdapter<p>the adapter invoking this method</p>
-
the
DS.Store<p>store related to the type and data</p>
-
type
subclass of DS.Model<p>the type corresponding to the operation</p>
-
operation
String<p>the operation e.g. 'find', 'updateRecord', etc.</p>
-
data
Object<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
limit
torows
- Converts
offset
tostart
- Defaults to
q=*:*
when no query is specified - Calls filterQueryForType
and sets
fq
when 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:
-
adapter
SolrAdapterthe adapter invoking this method
-
type
String -
operation
String -
query
Object
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`