LuceneSearch.php
174 self::$logger->debug(['oid' => $hit->oid, 'lang' => $hit->lang, 'document_id' => $hit->document_id, 'score' => $hit->score]);
182 $highlightedRegex = '/((<b style="color:black;background-color:#[0-9a-f]{6}">)+)([^<]+?)((<\/b>)+)/';
196 $highlighted = preg_replace($highlightedRegex, ' <em class="highlighted">$3</em> ', $highlighted);
314 foreach (array_merge(array_values($event->getInsertedOids()), $event->getUpdatedOids()) as $oid) {
setDefaultLanguageFallback($defaultLanguageFallback)
Set if the search index should use the default language, if a translation is missing.
Definition: LuceneSearch.php:130
DefaultIndexStrategy implements indexing of PersistentObject values and might be customized by overri...
Definition: DefaultIndexStrategy.php:32
setIndexStrategy(IndexStrategy $indexStrategy)
Set the IndexStrategy instance.
Definition: LuceneSearch.php:80
addToIndex(PersistentObject $obj)
Definition: LuceneSearch.php:263
IndexedSearch implementations are used to search entity objects in a search index.
Definition: IndexedSearch.php:23
StringUtil provides support for string manipulation.
Definition: StringUtil.php:18
const AFTER_COMMIT
An AFTER_COMMIT event occurs after the transaction is committed.
Definition: TransactionEvent.php:35
TransactionEvent instances are fired at different phases of a transaction.
Definition: TransactionEvent.php:23
static excerpt($string, $phrase, $radius=100)
Create an excerpt from the given text around the given phrase code based on: http://stackoverflow....
Definition: StringUtil.php:195
ObjectId is the unique identifier of an object.
Definition: ObjectId.php:28
isSearchable(PersistentObject $obj)
Definition: LuceneSearch.php:224
ConfigurationException signals an exception in the configuration.
Definition: ConfigurationException.php:18
static parse($oid)
Parse a serialized object id string into an ObjectId instance.
Definition: ObjectId.php:135
deleteFromIndex(ObjectId $oid)
Definition: LuceneSearch.php:292
IndexStrategy defines the interface for indexing implementations.
Definition: IndexStrategy.php:18
LuceneSearch provides access to the search based on ZendSearch/Lucene.
Definition: LuceneSearch.php:42
commitIndex($optimize=true)
Definition: LuceneSearch.php:239
getLiveUpdate()
Get if the search index should update itself, when persistent objects are created/updated/deleted.
Definition: LuceneSearch.php:122
FileUtil provides basic support for file functionality like HTTP file upload.
Definition: FileUtil.php:22
static getInstance($name, $dynamicConfiguration=[])
Definition: ObjectFactory.php:47
setLiveUpdate($liveUpdate)
Set if the search index should update itself, when persistent objects are created/updated/deleted.
Definition: LuceneSearch.php:113
find($searchTerm, PagingInfo $pagingInfo=null, $createSummary=true)
Definition: LuceneSearch.php:152
PagingInfo contains information about a paged list.
Definition: PagingInfo.php:18
PersistentObject defines the interface of all persistent objects.
Definition: PersistentObject.php:23
$GLOBALS['STOP_WORDS']
Standard german/english stop words taken from Lucene's StopAnalyzer.
Definition: LuceneSearch.php:375
LogManager is used to retrieve Logger instances.
Definition: LogManager.php:20
getProperty($name)
Get the value of a named property in the object.
ObjectFactory implements the service locator pattern by wrapping a Factory instance and providing sta...
Definition: ObjectFactory.php:24