VuFind API Documentation

Writer
in package

Solr Writer service

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Table of Contents

$changeTracker  : ChangeTrackerServiceInterface
$searchService  : Service
__construct()  : mixed
Constructor
commit()  : void
Commit the index.
deleteAll()  : void
Delete all records in the index.
deleteByQuery()  : void
Delete records based on a Solr query.
deleteRecords()  : void
Delete an array of IDs from the specified search backend
optimize()  : void
Optimize the index.
save()  : void
Save new record(s) to the index.
write()  : array<string|int, mixed>
Write a document to the search service. Return the result array from the command.

Properties

Methods

commit()

Commit the index.

public commit(string $backend) : void
Parameters
$backend : string

Backend ID

Return values
void

deleteAll()

Delete all records in the index.

public deleteAll(string $backend) : void

Note: This does not update the change tracker!

Parameters
$backend : string

Backend ID

Return values
void

deleteByQuery()

Delete records based on a Solr query.

public deleteByQuery(string $backend, string $query) : void

Note: This does not update the change tracker!

Parameters
$backend : string

Backend ID

$query : string

Delete query

Return values
void

deleteRecords()

Delete an array of IDs from the specified search backend

public deleteRecords(string $backend, array<string|int, mixed> $idList) : void
Parameters
$backend : string

Backend ID

$idList : array<string|int, mixed>

Record IDs to delete

Return values
void

optimize()

Optimize the index.

public optimize(string $backend) : void
Parameters
$backend : string

Backend ID

Return values
void

save()

Save new record(s) to the index.

public save(string $backend, DocumentInterface $doc[, string $handler = 'update' ][, ParamBag $params = null ]) : void
Parameters
$backend : string

Backend ID

$doc : DocumentInterface

Document(s) to save

$handler : string = 'update'

Update handler

$params : ParamBag = null

Update handler parameters

Return values
void

write()

Write a document to the search service. Return the result array from the command.

protected write(string $backend, DocumentInterface $doc[, int|null $timeout = null ][, string $handler = 'update' ][, ParamBag|null $params = null ]) : array<string|int, mixed>
Parameters
$backend : string

Backend ID

$doc : DocumentInterface

Document(s) to write

$timeout : int|null = null

Timeout value (null for default)

$handler : string = 'update'

Handler to use

$params : ParamBag|null = null

Additional backend params (optional)

Return values
array<string|int, mixed>

Search results