class SolariumDocument extends AbstractSolarium (View source)

Wrap a Solarium and a Document’ translations together to ease indexing.

Constants

TYPE_DISCRIMINATOR

Properties

static $availableLocalizedTextFields from AbstractSolarium
protected Client $client from AbstractSolarium
protected bool $indexed from AbstractSolarium
protected DocumentInterface $document from AbstractSolarium
protected Logger $logger from AbstractSolarium
protected array $documentTranslationItems

Methods

boolean|Result
indexAndCommit()

No description

Result
updateAndCommit()

No description

update(Query $update)

No description

boolean
remove(Query $update)

No description

removeAndCommit()

No description

cleanAndCommit()

No description

boolean
index()

No description

DocumentInterface
getDocument() deprecated

No description

$this
setDocument(DocumentInterface $document) deprecated

No description

$this
createEmptyDocument(Query $update)

No description

clean(Query $update)

No description

boolean
getDocumentFromIndex()

Get document fron Solr index.

array
getFieldsAssoc()

Get a key/value array representation of current indexed object.

array
getDocuments()

No description

__construct(Document $rzDocument, EntityManager $entityManager, Client $client = null, Logger $logger = null)

Create a new SolariumDocument.

Details

boolean|Result indexAndCommit()

Return Value

boolean|Result

Result updateAndCommit()

Return Value

Result

update(Query $update)

Parameters

Query $update

boolean remove(Query $update)

Parameters

Query $update

Return Value

boolean

removeAndCommit()

cleanAndCommit()

boolean index()

Return Value

boolean

DocumentInterface getDocument() deprecated

deprecated

Return Value

DocumentInterface

$this setDocument(DocumentInterface $document) deprecated

deprecated Use createEmptyDocument instead of set an empty Solr document.

Parameters

DocumentInterface $document

Return Value

$this

$this createEmptyDocument(Query $update)

Parameters

Query $update

Return Value

$this

clean(Query $update)

Parameters

Query $update

boolean getDocumentFromIndex()

Get document fron Solr index.

Return Value

boolean

protected array getFieldsAssoc()

Get a key/value array representation of current indexed object.

Return Value

array

Exceptions

Exception

array getDocuments()

Return Value

array Each document translation Solr document

__construct(Document $rzDocument, EntityManager $entityManager, Client $client = null, Logger $logger = null)

Create a new SolariumDocument.

Parameters

Document $rzDocument
EntityManager $entityManager
Client $client
Logger $logger