Overview

Namespaces

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

Classes

  • Facet
  • Hit
  • SearchResult
  • Overview
  • Namespace
  • Class
  • Tree

Class SearchResult

A search result

ArrayObject implements IteratorAggregate, Traversable, ArrayAccess, Serializable, Countable
Extended by vierbergenlars\Forage\SearchResult\SearchResult

Direct known subclasses

vierbergenlars\Forage\ODM\SearchResult
Namespace: vierbergenlars\Forage\SearchResult
Located at vierbergenlars/Forage/SearchResult/SearchResult.php
Methods summary
public
# __construct( array $result_array )

Creates a new SearchResult object

Creates a new SearchResult object

Parameters

$result_array
array
$result_array The result array from the transport layer

Private

Overrides

ArrayObject::__construct()
public array
# getFacets( )

Gets the facets for the search query

Gets the facets for the search query

Returns

array
public array
# getHits( )

Gets the hits (results) for the search query

Gets the hits (results) for the search query

Returns

array
public integer
# getTotalHits( )

Gets the total number of hits for the search.

Gets the total number of hits for the search.

This number may not be equal to the number of hits that are received by getHits()

Returns

integer
Methods inherited from ArrayObject
append(), asort(), count(), exchangeArray(), getArrayCopy(), getFlags(), getIterator(), getIteratorClass(), ksort(), natcasesort(), natsort(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), serialize(), setFlags(), setIteratorClass(), uasort(), uksort(), unserialize()
Constants inherited from ArrayObject
ARRAY_AS_PROPS, STD_PROP_LIST
Properties summary
protected integer $totalHits 0
#

The total number of hits the search query generated

The total number of hits the search query generated

protected array $facets array()
#

The facets for the search query

The facets for the search query

protected string $hitClass '\vierbergenlars\Forage\SearchResult\Hit'
#

The class that is instanciated for a hit

The class that is instanciated for a hit

protected string $facetClass '\vierbergenlars\Forage\SearchResult\Facet'
#

The class that is instanciated for a facet

The class that is instanciated for a facet

Forage-PHP-Client API documentation generated by ApiGen 2.8.0