searchThe 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
|
DB Search class This class inherits the functionality of the generic 'search' class. It extends it to implement a database search. |
lucene_connection
|
The lucene connection class |
swish_search
|
The swish search class |
searchengine_connection
|
The SearchEngine connection class |
mixed
$date_end
= false (line 132)
End date range for search (false means undefined). This
mixed
$date_fieldname
= "" (line 134)
Name of the field to which daterange should be applied
mixed
$date_start
= false (line 129)
Start date range for search (false means undefined). This
mixed
$executed
= false (line 136)
Whether we have run a query
mixed
$hit
= array() (line 120)
Array of hits returned. Each element of this array is
mixed
$max_results
= 25 (line 124)
Maximum results to return in query
mixed
$query
= "" (line 117)
Query string container
mixed
$searchterm
= array() (line 122)
Array of search terms to match
mixed
$skip_results
= 0 (line 126)
No. of results to skip in query (for paging)
mixed
$title
= "" (line 115)
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.
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