Inherits NSObject, and <EMSearchQueryDataSource>.
Inherited by EMEndecaSearchQueryDataSource.
Public Member Functions | |
| (id) | - initWithQuery: |
| (id) | - initWithQuery:endpoint: |
| (NSArray *) | - facetResults |
| (void) | - submitSearchQuery |
| (void) | - submitFacetQuery |
| (void) | - submitSortQuery |
| (void) | - releaseResult |
| (void) | - loadAllFacetValuesForFacet:facetId: |
| (BOOL) | - isLoadingFacet |
| (EMURLSearchRequest *) | - requestWithQuery:delegate: |
Protected Attributes | |
| NSString * | _endpoint |
| NSMutableArray * | _delegates |
| BOOL | loaded |
| BOOL | loading |
| BOOL | loadingMore |
| BOOL | loadingFacet |
| EMSearchQuery * | _query |
| EMSearchResult * | _result |
| NSMutableArray * | _results |
| EMURLSearchRequest * | _request |
| NSInteger | _firstPageSize |
Properties | |
| NSString * | endpoint |
| NSInteger | firstPageSize |
| BOOL | categoryResult |
| NSString * | didYouMean |
| NSString * | autocorrect |
| EMContentItem * | contentItem |
| - (NSArray *) facetResults |
returns an array of EMFacetResult objects
| - (id) initWithQuery: | (EMSearchQuery *) | query | |
| endpoint: | (NSString *) | endpoint | |
convenience constructor for initializing the data source with the query and the endpoint
| - (BOOL) isLoadingFacet |
If loadAllFacetValues:(NSString *)facetName has been called, a query will be submitted to load all facet values for the given facet. Currently only one call can be made at a time, for simplicity.
| - (void) loadAllFacetValuesForFacet: | (NSString *) | facetName | |
| facetId: | (NSString *) | facetId | |
Currently only one call can be made at a time, for simplicity.
| - (void) releaseResult |
Used to free up memory. Releases the result, but not the query
| - (EMURLSearchRequest *) requestWithQuery: | (EMSearchQuery *) | query | |
| delegate: | (id<TTURLRequestDelegate>) | delegate | |
Concrete subclasses must override this method to return a EMURLSearchRequest object for the given EMSearchQuery
| - (void) submitFacetQuery |
Submits the data source's query, releasing the old result altogether.
This should be the same as submitSearchQuery except that it disables did you mean.
| - (void) submitSearchQuery |
Submits the data source's query, releasing the old result altogether.
In addition this method prepares the query for a new search by:
| - (void) submitSortQuery |
Submits the data source's query, clearing the records from the result, but not the facets.
In addition this method prepares the query for a new sort query by:
- (NSString *) autocorrect [read, assign] |
The autocorrect returned by the search results. Returns nil if there is no autocorrect.
- (BOOL) categoryResult [read, assign] |
A category query is similar to a records query. Both specify a a navigation state, but in one, records (products) are returned, in the other, categories are returned.
- (EMContentItem *) contentItem [read, assign] |
The EMContentItem returned by the search results.
- (NSString *) didYouMean [read, assign] |
The didYouMean returned by the search results. Returns nil if there is no did you mean.
- (NSString *) endpoint [read, write, retain] |
Stores the base url for the search query. If this property is never set, this will return the value at [[EMConfiguration globalConfig] searchEndpoint]
- (NSInteger) firstPageSize [read, write, assign] |
The number of records that will be requested when calling submitSearchQuery or submitSortQuery.
Default = 10.
1.8.0