Beta version

class SolariumDocument extends AbstractSolarium

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

Constants

TYPE_DISCRIMINATOR

Properties

static $availableLocalizedTextFields from AbstractSolarium

Methods

boolean
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)

No description

$this
createEmptyDocument(Query $update)

No description

clean(Query $update)

No description

boolean
getDocumentFromIndex()

No description

array
getDocuments()

No description

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

Create a new SolariumDocument.

Details

at line 144
boolean indexAndCommit()

Index current nodeSource and commit after.

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

Return Value

boolean

at line 154
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

at line 164
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

at line 172
boolean remove(Query $update)

Remove current document from SearchEngine index.

Parameters

Query $update

Return Value

boolean

Exceptions

RuntimeException If no document is available.

at line 181
removeAndCommit()

Remove current Solr document and commit after.

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

at line 189
cleanAndCommit()

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

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

at line 197
boolean index()

Index current document with entity data.

Return Value

boolean

Exceptions

RuntimeException If no document is available.

at line 53
DocumentInterface getDocument()

Return Value

DocumentInterface

in AbstractSolarium at line 231
$this setDocument(DocumentInterface $document)

Parameters

DocumentInterface $document

Return Value

$this

at line 120
$this createEmptyDocument(Query $update)

Parameters

Query $update

Return Value

$this

at line 134
clean(Query $update)

Parameters

Query $update

at line 106
boolean getDocumentFromIndex()

Return Value

boolean FALSE if no document found linked to current roadiz document.

at line 61
array getDocuments()

Return Value

array Each document translation Solr document

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

Create a new SolariumDocument.

Parameters

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