Implements interfaces:
This class provides a PHP-front end to the basic Dieselpoint search capabilities.
The unit of work of WFDieselSearch is a single search. Once a search has been performed, the search cannot be re-used.
Submit a query in DQL and get back paginated, sorted results. Also can generate "FacetGenerator" objects for the current search.
DP Questions:
Setup:
array loadObjectsCallback($objectIDArray)
You set the callback with setResultObjectLoaderCallback or setResultObjectLoaderCallbackWithPropelPeer.
The ids passed to the callback are retrieved from the Dieselpoint index. The ID is configured in Dieselpoint by setting up one of the attributes as the item id:
prop_id, type=Item_id, datatype=I # configure "prop_id" as the item_id for the index items.
IMPORTANT! This implementation of WFDieselSearch requires mfg.jar ("MouserFacetGenerator" code). This also requires a special diesel-x-x-x.jar from DP that has the "postings" class.
Located in /framework/WFDieselpoint.php (line 48)
WFObject | --WFDieselSearch
Add the Relevance sort option to the paginator.
If there is no paginator, this function does nothing.
Execute the search.
Get a FacetGenerator object.
If no search has been run, then the FacetGenerator works off of the entire index. If a search has run, it works off the results.
Get the total number of items in the index.
Don't know if this works yet... will need to test by using a non-WFDieselNav search interface.
Get the query string set by setQueryString.
Get the number of items in the search result.
Has the search been executed yet?
Get the index used for the search.
Are the results sorted by relevance?
Get an array of the item_id's on the current page of results.
Has logPerformanceInfo been turned on?
Get a human-readable description of the current query.
Get the "parameter ID" used for persisting the queryState of the dieselsearch for pagination and UI state management.
Get the replacement query suggested by DP. Spelling corrections, etc.
This seems only to work with full-text searches, not with attribute searches.
Get the searcher used for the search.
Choose the Dieselpoint index to use for this query.
Set the columns of data to load from the index in the results.
Note that "item_id" will be added automatically to the columns of the result set as it is used internally.
Should WFDieselSearch log the performance info to the PHOCOA log dir file: "diesel.log"?
Set the paginator associated with this WFDieselSearch.
NOTE: This function automatically sets the WFDieselSearch instance as the data delegate for the paginator, so you don't need to do that yourself.
Set the queryState of the dieselsearch to the passed state string.
Set the DQL query string.
Callback function for loading the items found by DP.
void myFunction( array(WFDieselHit), $sortKeys)
The callback should load the objects via setObject() on each WFDieselHit.
Use a PropelPeer to load the items.
This method will use the "doSelect" method of the peer to load the items with the same sort criteria passed into the DP object. Therefore, it's important that your "attribute" names in DP match the column names.
Set the PropelPeer method name to use to load the objects.
Default is 'doSelect', but you can set your own method for instance if you want a custom function that loads joined data.
A higher-level function for calling setQueryString.
Useful when you want to use a text-field "query" input to search. This function strips all "DQL control characters" and calls setQueryString with the result.
Calling this function automatically switches the result sorting to "Relevance" mode.
Utility function for debugging to start time tracking.
Stop tracking time; dump time to 'dieselsearch.log' file with given message.
Inherited From WFObject
WFObject::__construct()
WFObject::exposedProperties()
WFObject::getClass()
WFObject::keyPathToTargetAndKey()
WFObject::setValueForKey()
WFObject::setValueForKeyPath()
WFObject::validateValueForKey()
WFObject::validateValueForKeyPath()
WFObject::valueForKey()
WFObject::valueForKeyPath()
WFObject::valueForUndefinedKey()
WFObject::__toString()
Documentation generated on Thu, 17 Apr 2008 13:51:38 -0400 by phpDocumentor 1.4.1