class SolariumDocumentTranslation extends AbstractSolarium (View source)

Wrap a Solarium and a DocumenTranslation together to ease indexing.

Constants

TYPE_DISCRIMINATOR

DOCUMENT_TYPE

IDENTIFIER_KEY

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 Document $rzDocument
protected DocumentTranslation $documentTranslation

Methods

boolean|Result
indexAndCommit()

Index current nodeSource and commit after.

Result
updateAndCommit()

Update current nodeSource document and commit after.

update(Query $update)

Update current nodeSource document with existing update.

boolean
remove(Query $update)

Remove current document from SearchEngine index.

removeAndCommit()

Remove current Solr document and commit after.

cleanAndCommit()

Remove any document linked to current node-source and commit after.

boolean
index()

Index current document with entity data.

DocumentInterface
getDocument()

No description

$this
setDocument(DocumentInterface $document) deprecated

No description

$this
createEmptyDocument(Query $update)

No description

clean(Query $update)

Remove any document linked to current node-source.

boolean
getDocumentFromIndex()

Get document fron Solr index.

array
getFieldsAssoc()

Get a key/value array representation of current node-source document.

__construct(DocumentTranslation $documentTranslation, Client $client = null, Logger $logger = null)

Create a new SolariumDocument.

Details

boolean|Result indexAndCommit()

Index current nodeSource and commit after.

Use this method only when you need to index single NodeSources.

Return Value

boolean|Result

Result updateAndCommit()

Update current nodeSource document and commit after.

Use this method only when you need to re-index a single NodeSources.

Return Value

Result

update(Query $update)

Update current nodeSource document with existing update.

Use this method only when you need to re-index bulk NodeSources.

Parameters

Query $update

boolean remove(Query $update)

Remove current document from SearchEngine index.

Parameters

Query $update

Return Value

boolean

Exceptions

RuntimeException If no document is available.

removeAndCommit()

Remove current Solr document and commit after.

Use this method only when you need to remove a single NodeSources.

cleanAndCommit()

Remove any document linked to current node-source and commit after.

Use this method only when you need to remove a single NodeSources.

boolean index()

Index current document with entity data.

Return Value

boolean

Exceptions

RuntimeException If no document is available.

DocumentInterface getDocument()

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)

Remove any document linked to current node-source.

Parameters

Query $update

boolean getDocumentFromIndex()

Get document fron Solr index.

Return Value

boolean

protected array getFieldsAssoc()

Get a key/value array representation of current node-source document.

Return Value

array

Exceptions

Exception

__construct(DocumentTranslation $documentTranslation, Client $client = null, Logger $logger = null)

Create a new SolariumDocument.

Parameters

DocumentTranslation $documentTranslation
Client $client
Logger $logger