ezcSearchQueryBuilder provides a method to add a natural language search query to an exisiting query object.
Source for this file: /Search/src/query_builder.php
Version: | //autogen// |
protected static array(ezcSearchQueryToken) |
tokenize(
$searchQuery
)
Tokenizes the search query into tokens |
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. |
Tokenizes the search query into tokens
Name | Type | Description |
---|---|---|
$searchQuery |
string |
Walks over the $tokens and builds the query $q from them and the $searchFields
Name | Type | Description |
---|---|---|
$q |
ezcSearchQuery | |
$tokens |
array(ezcSearchQueryToken) | |
$searchFields |
array(string) |
Type | Description |
---|---|
ezcSearchBuildQueryException |
if there is an uneven set of quotes. |
Parses the $searchQuery and adds the selection clauses to the $query object
Name | Type | Description |
---|---|---|
$query |
ezcSearchQuery | |
$searchQuery |
string | |
$searchFields |
array(string) |
Resets the parser to its initial state.