Overview

Namespaces

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

Classes

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

Class Hit

A search hit

Direct known subclasses

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

Creates a new hit object

Creates a new hit object

Parameters

$hit_array
array
$hit_array

Private

public float
# getScore( )

Gets the score of the document for the search query

Gets the score of the document for the search query

Returns

float
public array
# getMatchedTerms( )

Gets the terms that matched in the document

Gets the terms that matched in the document

Returns

array
public array
# getDocument( )

Gets the document

Gets the document

Returns

array
public string|integer
# getId( )

Gets the id of the document

Gets the id of the document

Returns

string|integer
Properties summary
protected string|integer $id
#

The id of the document that matched

The id of the document that matched

protected array $matchedTerms
#

The terms that matched in the document

The terms that matched in the document

protected array $document
#

The matched document

The matched document

protected float $score
#

The result score for the document

The result score for the document

Forage-PHP-Client API documentation generated by ApiGen 2.8.0