CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Job\ElasticaDocumentsJsonSerde Class Reference

Updates to be sent to elasticsearch need to be represented as a Document object, but we can't directly serialize those into the job queue which only supports json. More...

Public Member Functions

 serialize (array $docs)
 
 deserialize (array $serialized)
 

Detailed Description

Updates to be sent to elasticsearch need to be represented as a Document object, but we can't directly serialize those into the job queue which only supports json.

Implements a simple serialize / deserialize routine that round trips documents to plain json types and back.

Member Function Documentation

◆ deserialize()

CirrusSearch\Job\ElasticaDocumentsJsonSerde::deserialize ( array $serialized)
Parameters
array[]$serializedData returned by self::serialize
Returns
Document[]

◆ serialize()

CirrusSearch\Job\ElasticaDocumentsJsonSerde::serialize ( array $docs)
Parameters
Document[]$docs
Returns
array[] Document represented with json compatible types

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