The search class is an object which can be assigned search terms, can execute a search, and can contain search hits having executed a seach.
NOTE: This is a virtual class which is expected to be used by a child class which implements a particular search mechanism eg: swish++ or database query searching. As such the execute() method does nothing and must be over-ridden in the child classes implementing searching.
Located in /search-defs.php (line 113)
Class | Description |
---|---|
![]() |
DB Search class This class inherits the functionality of the generic 'search' class. It extends it to implement a database search. |
![]() |
The lucene connection class |
![]() |
The swish search class |
End date range for search (false means undefined). This
Name of the field to which daterange should be applied
Start date range for search (false means undefined). This
Whether we have run a query
Array of hits returned. Each element of this array is
Maximum results to return in query
Query string container
Array of search terms to match
No. of results to skip in query (for paging)
Title for heading of output
Constructor Create a new search.
Clear the date range for the search. Makes sure that the search will not be filtered by a date restriction.
Define a search term which the search must not match to succeed.
Initialise everything about the search.
Initialise to a state which is the same as when the object is instantiated.
Add a new search term to match. Search terms can be a single word or compound patterns, Each time one of these is added, it has an operator associated with it - whether this term is a "may have" (OR), or a "must have" (AND) term.
Visualize these terms as self-contained statements, with brackets around each end, and which are joined to others by the given operator to make the whole query.
Define a search term which the search may or may not match.
Define a search term which the search must match to succeed.
Reset search results Reset the search results, hit-count, and query executed status.
Set date range Set the date range for the search. This is just recording the given date information for use by child classes of this one. We do not even care what the format of the dates is. They are just stored.
Set maximum results Sets the maximum results to return from the search.
Set skip results
Sets the number of results to skip in the query. Eg. If this is set to 15, then the first 15 results of the query will be skipped before returning results. This can be used as a method of paging a query which returns a large number of results..
Documentation generated by phpDocumentor 1.3.0RC3