IndexedSearch Interface Reference
Detailed Description
IndexedSearch implementations are used to search entity objects in a search index.
Definition at line 23 of file IndexedSearch.php.
Inheritance diagram for IndexedSearch:
Public Member Functions | |
resetIndex () | |
addToIndex (PersistentObject $obj) | |
deleteFromIndex (ObjectId $oid) | |
commitIndex ($optimize=true) | |
optimizeIndex () | |
Public Member Functions inherited from Search | |
check ($word) | |
find ($searchTerm, PagingInfo $pagingInfo=null, $createSummary=true) | |
isSearchable (PersistentObject $obj) | |
Member Function Documentation
◆ resetIndex()
resetIndex | ( | ) |
Reset the search index.
Implemented in LuceneSearch.
◆ addToIndex()
addToIndex | ( | PersistentObject | $obj | ) |
Add/update a PersistentObject instance to/in the search index.
This method modifies the index. For that reason IndexedSearch::commitIndex() should be called afterwards.
- Parameters
-
$obj The PersistentObject instance.
Implemented in LuceneSearch.
◆ deleteFromIndex()
deleteFromIndex | ( | ObjectId | $oid | ) |
Delete a PersistentObject instance from the search index.
This method modifies the index. For that reason IndexedSearch::commitIndex() should be called afterwards.
- Parameters
-
$oid The ObjectId of the PersistentObject instance.
Implemented in LuceneSearch.
◆ commitIndex()
commitIndex | ( | $optimize = true | ) |
Commit changes made on the index.
- Note
- This method only commits the index if changes were made using the methods mentioned above.
- Parameters
-
$optimize Boolean whether the index should be optimized after commit (default: true).
Implemented in LuceneSearch.
◆ optimizeIndex()
optimizeIndex | ( | ) |
Optimize the index.
Implemented in LuceneSearch.