Overview

Namespaces

  • PHP
  • vierbergenlars
    • Forage
      • ODM
        • HydrationSettings
      • QueryParser
      • SearchIndex
      • SearchQuery
      • SearchResult
      • Transport

Classes

  • Query
  • QueryBuilder
  • Overview
  • Namespace
  • Class
  • Tree

Class Query

A search query

Direct known subclasses

vierbergenlars\Forage\ODM\SearchQuery
Namespace: vierbergenlars\Forage\SearchQuery
Located at vierbergenlars/Forage/SearchQuery/Query.php
Methods summary
public
# __construct( vierbergenlars\Forage\Transport\TransportInterface $transport, string $query = '' )

Creates a new search query

Creates a new search query

Parameters

$transport
vierbergenlars\Forage\Transport\TransportInterface
$transport
$query
string
$query
public vierbergenlars\Forage\SearchQuery\Query
# setQuery( string $query )

Sets the search query

Sets the search query

Parameters

$query
string
$query

Returns

vierbergenlars\Forage\SearchQuery\Query
public vierbergenlars\Forage\SearchQuery\Query
# setSearchFields( array $searchFields )

Sets the fields to search in

Sets the fields to search in

Parameters

$searchFields
array
$searchFields

Returns

vierbergenlars\Forage\SearchQuery\Query
public vierbergenlars\Forage\SearchQuery\Query
# setFacetFields( array $facetFields )

Sets the fields to facet on

Sets the fields to facet on

Parameters

$facetFields
array
$facetFields

Returns

vierbergenlars\Forage\SearchQuery\Query
public vierbergenlars\Forage\SearchQuery\Query
# setSearchFilters( array $searchFilters )

Sets filters for search fields

Sets filters for search fields

Parameters

$searchFilters
array
$searchFilters

Returns

vierbergenlars\Forage\SearchQuery\Query
public vierbergenlars\Forage\SearchQuery\Query
# setOffset( integer $offset )

Sets the offset to the start of the result list

Sets the offset to the start of the result list

Parameters

$offset
integer
$offset

Returns

vierbergenlars\Forage\SearchQuery\Query
public vierbergenlars\Forage\SearchQuery\Query
# setLimit( integer $limit )

Sets the number of records to fetch

Sets the number of records to fetch

Parameters

$limit
integer
$limit

Returns

vierbergenlars\Forage\SearchQuery\Query
public vierbergenlars\Forage\SearchQuery\Query
# setWeights( array $weights )

Sets the weights of each column

Sets the weights of each column

Parameters

$weights
array
$weights

Returns

vierbergenlars\Forage\SearchQuery\Query
public vierbergenlars\Forage\SearchResult\SearchResult
# execute( )

Executes the query

Executes the query

Returns

vierbergenlars\Forage\SearchResult\SearchResult
Properties summary
public string $query ''
#

The search query

The search query

public array $searchFields array()
#

The fields to search in

The fields to search in

public array $facetFields array()
#

The fields to facet on

The fields to facet on

public array $searchFilters array()
#

The fields to filter the search result on

The fields to filter the search result on

public integer $offset 0
#

The offset to the start of the result list

The offset to the start of the result list

public integer $limit 10
#

The number of records to fetch

The number of records to fetch

public array $weights array()
#

The weights of each column

The weights of each column

protected string $searchResultClass '\vierbergenlars\Forage\SearchResult\SearchResult'
#

The class that parses the results

The class that parses the results

protected vierbergenlars\Forage\Transport\TransportInterface $transport
#

The transport to use

The transport to use

Forage-PHP-Client API documentation generated by ApiGen 2.8.0