Search: ezcSearchQueryBuilder
[ ]
[ Solr schema ]
[ ]
[ ]
[ ]
[ ]
Class: ezcSearchQueryBuilder
|
ezcSearchQueryBuilder provides a method to add a natural language search query to an exisiting query object. [
source]
Method Summary
|
protected void |
buildQuery(
$q, $tokens, $searchFields )
Walks over the $tokens and builds the query $q from them and the $searchFields |
|
public void |
parseSearchQuery(
$query, $searchQuery, $searchFields )
Parses the $searchQuery and adds the selection clauses to the $query object |
|
public void |
reset(
)
Resets the parser to its initial state. |
|
protected static array(ezcSearchQueryToken) |
tokenize(
$searchQuery )
Tokenizes the search query into tokens |
Methods
buildQuery
void buildQuery(
ezcSearchQuery
$q, array(ezcSearchQueryToken)
$tokens, array(string)
$searchFields )
Walks over the $tokens and builds the query $q from them and the $searchFields
Parameters
| Name |
Type |
Description |
$q |
ezcSearchQuery |
|
$tokens |
array(ezcSearchQueryToken) |
|
$searchFields |
array(string) |
|
Throws
| Class | Description |
ezcSearchBuildQueryException |
if there is an uneven set of quotes. |
parseSearchQuery
void parseSearchQuery(
ezcSearchQuery
$query, string
$searchQuery, array(string)
$searchFields )
Parses the $searchQuery and adds the selection clauses to the $query object
Parameters
| Name |
Type |
Description |
$query |
ezcSearchQuery |
|
$searchQuery |
string |
|
$searchFields |
array(string) |
|
reset
void reset(
)
Resets the parser to its initial state.
tokenize
array(ezcSearchQueryToken) tokenize(
string
$searchQuery )
Tokenizes the search query into tokens
Parameters
| Name |
Type |
Description |
$searchQuery |
string |
|
Last updated: Mon, 21 Dec 2009