Search in sources :

Example 6 with FullTextEntry

use of com.rbmhtechnology.vind.monitoring.logger.entry.FullTextEntry in project vind by RBMHTechnology.

the class MonitoringSearchServer method execute.

public SearchResult execute(FulltextSearch search, DocumentFactory factory, HashMap<String, Object> metadata) {
    final ZonedDateTime start = ZonedDateTime.now();
    final SearchResult result = server.execute(search, factory);
    final ZonedDateTime end = ZonedDateTime.now();
    final FullTextEntry entry = new FullTextEntry(this.server, factory, application, search, result, start, end, result.getQueryTime(), result.getElapsedTime(), session);
    final HashMap<String, Object> mergedMetadata = new HashMap<>();
    mergedMetadata.putAll(this.monitoringMetadata);
    mergedMetadata.putAll(metadata);
    entry.setMetadata(mergedMetadata);
    logger.log(entry);
    return result;
}
Also used : FullTextEntry(com.rbmhtechnology.vind.monitoring.logger.entry.FullTextEntry) ZonedDateTime(java.time.ZonedDateTime) HashMap(java.util.HashMap)

Aggregations

FullTextEntry (com.rbmhtechnology.vind.monitoring.logger.entry.FullTextEntry)6 ZonedDateTime (java.time.ZonedDateTime)4 HashMap (java.util.HashMap)2 DocumentFactory (com.rbmhtechnology.vind.model.DocumentFactory)1 DocumentFactoryBuilder (com.rbmhtechnology.vind.model.DocumentFactoryBuilder)1 FieldDescriptorBuilder (com.rbmhtechnology.vind.model.FieldDescriptorBuilder)1 SingleValueFieldDescriptor (com.rbmhtechnology.vind.model.SingleValueFieldDescriptor)1 SimpleApplication (com.rbmhtechnology.vind.monitoring.model.application.SimpleApplication)1 SimpleSession (com.rbmhtechnology.vind.monitoring.model.session.SimpleSession)1 Ignore (org.junit.Ignore)1 Test (org.junit.Test)1