Search: ezcSearchFindQuery
[ ]
[ Solr schema ]
[ ]
[ ]
[ ]
[ ]
Interface: ezcSearchFindQuery
|
Class to create select search backend indepentent search queries. [
source]
Parents
ezcSearchQuery
|
--ezcSearchFindQuery
Method Summary
|
public string |
boost(
$clause, $boostFactor )
Modifies a clause to give it higher weight while searching. |
|
public ezcSearchQuery |
facet(
$facet )
Adds one facet to the query. |
|
public string |
fuzz(
$clause, [$fuzzFactor = null] )
Modifies a clause make it fuzzy. |
|
public string |
important(
$clause )
Creates an 'important' clause |
|
public ezcSearchQuery |
limit(
$limit, [$offset = 0] )
Registers from which offset to start returning results, and how many results to return. |
|
public ezcSearchQuery |
orderBy(
$column, [$type = ezcSearchQueryTools::ASC] )
Tells the query on which field to sort on, and in which order |
|
public ezcSearchFindQuery |
select(
$... )
Opens the query and selects which fields you want to return with the query. |
Inherited Methods
From
ezcSearchQuery :
Methods
boost
string boost(
string
$clause, float
$boostFactor )
Modifies a clause to give it higher weight while searching.
This method accepts a clause and adds a boost factor.
Parameters
| Name |
Type |
Description |
$clause |
string |
|
$boostFactor |
float |
|
facet
Adds one facet to the query.
Parameters
| Name |
Type |
Description |
$facet |
string |
|
fuzz
string fuzz(
string
$clause, [float
$fuzzFactor = null] )
Modifies a clause make it fuzzy.
This method accepts a clause and registers it as a fuzzy search, an optional fuzz factor is also supported.
Parameters
| Name |
Type |
Description |
$clause |
string |
|
$fuzzFactor |
float |
|
important
string important(
string
$clause )
Creates an 'important' clause
This method accepts a clause and marks it as important.
Parameters
| Name |
Type |
Description |
$clause |
string |
|
limit
Registers from which offset to start returning results, and how many results to return.
$limit controls the maximum number of rows that will be returned. $offset controls which row that will be the first in the result set from the total amount of matching rows.
Parameters
| Name |
Type |
Description |
$limit |
int |
|
$offset |
int |
|
orderBy
ezcSearchQuery orderBy(
string
$column, [int
$type = ezcSearchQueryTools::ASC] )
Tells the query on which field to sort on, and in which order
You can call orderBy multiple times. Each call will add a column to order by.
Parameters
| Name |
Type |
Description |
$column |
string |
|
$type |
int |
|
select
Opens the query and selects which fields you want to return with the query.
select() accepts an arbitrary number of parameters. Each parameter must contain either the name of a field or an array containing the names of the fields. Each call to select() appends fields to the list of fields that will be used in the query.
Example:
1. $q->select( 'field1', 'field2' );
The same could also be written:
1. $fields[] = 'field1';
2. $fields[] = 'field2;
3. $q->select( $fields );
or using several calls
1. $q->select( 'field1' )->select( 'field2' );
Parameters
| Name |
Type |
Description |
$... |
string|array(string) |
Either a string with a field name or an array of field names. |
Last updated: Mon, 21 Dec 2009