Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Protected Attributes | List of all members
eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native Class Reference

The Native Gateway provides the implementation to retrieve the desired documents from Elasticsearch index storage. More...

Inheritance diagram for eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native:

## Public Member Functions
| __construct (HttpClient $client, Serializer $serializer, CriterionVisitorDispatcher $criterionVisitorDispatcher, SortClauseVisitor $sortClauseVisitor, FacetBuilderVisitor $facetBuilderVisitor, $indexName)
| index (Document $document)
| Indexes a given $document. More...
| bulkIndex (array $documents)
| Performs bulk index of a given array of documents. More...
| find (Query $query, $type, array $languageFilter=[])
| Finds and returns documents of a given $type for a given $query object. More...
| findRaw ($query, $type)
| Finds and returns documents of a given $type for a given $query string. More...
| purgeIndex ($type)
| Deletes all documents of a given $type from the index. More...
| delete ($id, $type)
| Deletes a single document of the given $type by given document $id. More...
| deleteByQuery ($query, $type)
| Deletes a document(s) of the given $type by given $query string. More...
| flush ()
| Flushes data from memory to the index storage. More...

## Protected Attributes
| $client
| $serializer
| $criterionVisitorDispatcher
| $sortClauseVisitor
| $facetBuilderVisitor
| $indexName

## Detailed Description

The Native Gateway provides the implementation to retrieve the desired documents from Elasticsearch index storage.

Definition at line 23 of file Native.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native::__construct | ( | HttpClient | $client,
|  | Serializer | $serializer,
|  | CriterionVisitorDispatcher | $criterionVisitorDispatcher,
|  | SortClauseVisitor | $sortClauseVisitor,
|  | FacetBuilderVisitor | $facetBuilderVisitor,
|  |  | $indexName
| ) |  |

Parameters

  \eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\HttpClient | $client |
  \eZ\Publish\Core\Search\Elasticsearch\Content\Serializer | $serializer |
  \eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitorDispatcher | $criterionVisitorDispatcher |
  \eZ\Publish\Core\Search\Elasticsearch\Content\SortClauseVisitor | $sortClauseVisitor |
  \eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor | $facetBuilderVisitor |
  string | $indexName |

Definition at line 71 of file Native.php.

References eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\$client, eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\$criterionVisitorDispatcher, eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\$facetBuilderVisitor, eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\$indexName, eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\$serializer, and eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\$sortClauseVisitor.

## Member Function Documentation

## ◆ bulkIndex()

eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native::bulkIndex | ( | array | $documents | ) |

Performs bulk index of a given array of documents.

Parameters

  \eZ\Publish\Core\Search\Elasticsearch\Content\Document[] | $documents |

Reimplemented from eZ\Publish\Core\Search\Elasticsearch\Content\Gateway.

Definition at line 119 of file Native.php.

References eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\flush().

## ◆ delete()

eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native::delete | ( |  | $id,
|  |  | $type
| ) |  |

Deletes a single document of the given $type by given document $id.

Parameters

  int | string | $id |
  string | $type |

Reimplemented from eZ\Publish\Core\Search\Elasticsearch\Content\Gateway.

Definition at line 258 of file Native.php.

References eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\flush().

## ◆ deleteByQuery()

eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native::deleteByQuery | ( |  | $query,
|  |  | $type
| ) |  |

Deletes a document(s) of the given $type by given $query string.

Parameters

  string | $query |
  string | $type |

Reimplemented from eZ\Publish\Core\Search\Elasticsearch\Content\Gateway.

Definition at line 270 of file Native.php.

References eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\flush().

## ◆ find()

eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native::find | ( | Query | $query,
|  |  | $type,
|  | array | $languageFilter = `[]`
| ) |  |

Finds and returns documents of a given $type for a given $query object.

Parameters

  \eZ\Publish\API\Repository\Values\Content\Query | $query |
  string | $type |
  array | $languageFilter |

Returns
  mixed

Reimplemented from eZ\Publish\Core\Search\Elasticsearch\Content\Gateway.

Definition at line 160 of file Native.php.

References eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitorDispatcher\CONTEXT_FILTER, eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitorDispatcher\CONTEXT_QUERY, and eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\findRaw().

## ◆ findRaw()

eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native::findRaw | ( |  | $query,
|  |  | $type
| ) |  |

Finds and returns documents of a given $type for a given $query string.

Parameters

  string | $query |
  string | $type |

Returns
  \eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Message

Reimplemented from eZ\Publish\Core\Search\Elasticsearch\Content\Gateway.

Definition at line 219 of file Native.php.

Referenced by eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\find().

## ◆ flush()

eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native::flush | ( |  | ) |

Flushes data from memory to the index storage.

Reimplemented from eZ\Publish\Core\Search\Elasticsearch\Content\Gateway.

Definition at line 288 of file Native.php.

Referenced by eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\bulkIndex(), eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\delete(), eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\deleteByQuery(), eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\index(), and eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\purgeIndex().

## ◆ index()

eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native::index | ( | Document | $document | ) |

Indexes a given $document.

Parameters

  \eZ\Publish\Core\Search\Elasticsearch\Content\Document | $document |

Reimplemented from eZ\Publish\Core\Search\Elasticsearch\Content\Gateway.

Definition at line 92 of file Native.php.

References eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\flush().

## ◆ purgeIndex()

eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native::purgeIndex | ( |  | $type | ) |

Deletes all documents of a given $type from the index.

Parameters

  string | $type |

Reimplemented from eZ\Publish\Core\Search\Elasticsearch\Content\Gateway.

Definition at line 240 of file Native.php.

References eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\flush().

## Member Data Documentation

## ◆ $client

eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native::$client
| protected

Definition at line 26 of file Native.php.

Referenced by eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\__construct().

## ◆ $criterionVisitorDispatcher

eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native::$criterionVisitorDispatcher
| protected

Definition at line 40 of file Native.php.

Referenced by eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\__construct().

## ◆ $facetBuilderVisitor

eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native::$facetBuilderVisitor
| protected

Definition at line 54 of file Native.php.

Referenced by eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\__construct().

## ◆ $indexName

eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native::$indexName
| protected

Definition at line 61 of file Native.php.

Referenced by eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\__construct().

## ◆ $serializer

eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native::$serializer
| protected

Definition at line 33 of file Native.php.

Referenced by eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\__construct().

## ◆ $sortClauseVisitor

eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native::$sortClauseVisitor
| protected

Definition at line 47 of file Native.php.

Referenced by eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\__construct().

The documentation for this class was generated from the following file:

- Native.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.