Class

eZ\Publish\API\Repository\Values\Content\Query\Criterion\FullText

class FullText extends Criterion implements CriterionInterface, CustomFieldInterface

Full text search criterion.

The string provided in this criterion is matched as a full text query against all indexed content objects in the storage layer.

Normalization and querying capabilities might depend on the system configuration or the used search engine and might differ. To find about supported querying capabilities you can use {@link \eZ\Publish\API\Repository\SearchService::supports()} method.

If supported, advanced full text query has the following semantics:

If advanced full text query is not supported, basic query format will be available:

Properties

string $operator The operator used by the Criterion.
array(int|string) $value The value(s) matched by the criteria.
string $target The target used by the criteria (field, metadata...).
Value $valueData Additional value data, required by some criterions, MapLocationDistance for instance.
float $fuzziness Fuzziness of the fulltext search.
array $boost Boost for certain fields.
mixed $analyzers Analyzer configuration.
mixed $wildcards Analyzer wildcard handling configuration.

Methods

__construct(string[]|int[]|int|string $value, array $properties = array())

Performs operator validation based on the Criterion specifications returned by {see getSpecifications()}.

static  createFromQueryBuilder($target, $operator, $value)

Specifications[] getSpecifications()

Criterion description function.

setCustomField(string $type, string $field, string $customField)

Set a custom field to query.

mixed getCustomField(string $type, string $field)

Retun custom field.

Details

at line 104
public __construct(string[]|int[]|int|string $value, array $properties = array())

Performs operator validation based on the Criterion specifications returned by {see getSpecifications()}.

Parameters

string[]|int[]|int|string $value
array $properties

Exceptions

InvalidArgumentException if the provided operator isn't supported

at line 126
static public createFromQueryBuilder($target, $operator, $value)

Parameters

$target
$operator
$value

at line 119
public Specifications[] getSpecifications()

Criterion description function.

Returns the combination of the Criterion's supported operator/value, as an array of eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications objects - Operator is one supported Operator, as an Operator::* constant - ValueType is the type of input value this operator requires, either array or single - SupportedTypes is an array of types the operator will accept - ValueCountLimitation is an integer saying how many values are expected.

// IN and EQ are supported return array( // The EQ operator expects a single value, either as an integer or a string new Specifications( Operator::EQ, Specifications::INPUTTYPESINGLE, array( Specifications::INPUTVALUEINTEGER, Specifications::INPUTVALUESTRING ), ), // The IN operator expects an array of values, of either integers or strings new Specifications( Operator::IN, Specifications::INPUTTYPEARRAY, array( Specifications::INPUTVALUEINTEGER, Specifications::INPUTVALUESTRING ) ) )*

Return Value

Specifications[]

at line 140
public setCustomField(string $type, string $field, string $customField)

Set a custom field to query.

Set a custom field to query for a defined field in a defined type.

Parameters

string $type
string $field
string $customField

at line 155
public mixed getCustomField(string $type, string $field)

Retun custom field.

If no custom field is set, return null

Parameters

string $type
string $field

Return Value

mixed If no custom field is set, return null