Overview

Namespaces

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

Classes

  • Index
  • Overview
  • Namespace
  • Class
  • Tree

Class Index

The search index

Direct known subclasses

vierbergenlars\Forage\ODM\SearchIndex
Namespace: vierbergenlars\Forage\SearchIndex
Located at vierbergenlars/Forage/SearchIndex/Index.php
Methods summary
public
# __construct( vierbergenlars\Forage\Transport\TransportInterface $transport, array $documents = array(), array $facetFields = array() )

Creates a new search index

Creates a new search index

Parameters

$transport
vierbergenlars\Forage\Transport\TransportInterface
$transport
$documents
array
$documents The documents to upload. The array key is the document ID.
$facetFields
array
$facetFields The fields to facet on
public vierbergenlars\Forage\SearchIndex\Index
# addFacetField( string $field )

Adds a field to facet on

Adds a field to facet on

Parameters

$field
string
$field

Returns

vierbergenlars\Forage\SearchIndex\Index
public vierbergenlars\Forage\SearchIndex\Index
# removeFacetField( string $field )

Removes a field that was faceted on

Removes a field that was faceted on

Parameters

$field
string
$field

Returns

vierbergenlars\Forage\SearchIndex\Index
public vierbergenlars\Forage\SearchIndex\Index
# addDocument( string|integer $id, array $document )

Adds a new document to the index

Adds a new document to the index

Parameters

$id
string|integer
$id The id of the document
$document
array
$document The data for the document

Returns

vierbergenlars\Forage\SearchIndex\Index
public vierbergenlars\Forage\SearchIndex\Index
# removeDocument( integer|string $id )

Removes a document from the index

Removes a document from the index

Parameters

$id
integer|string
$id The id of the document

Returns

vierbergenlars\Forage\SearchIndex\Index
public boolean
# flush( )

Sends all changes to the index to the transport

Sends all changes to the index to the transport

Returns

boolean
Properties summary
protected array $uploadedDocuments array()
#

The documents in the queue to be uploaded

The documents in the queue to be uploaded

protected array $removedDocuments array()
#

The documents in the queue to be deleted

The documents in the queue to be deleted

protected array $facetFields array()
#

The fields to facet the uploaded documents on

The fields to facet the uploaded documents on

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