This commit is contained in:
rjawor 2019-05-21 11:39:12 +02:00
parent d2cfce7f02
commit 217fa0d9c7

View File

@ -46,11 +46,17 @@ void SearcherController::fullSearch(rapidjson::Writer<rapidjson::StringBuffer> &
const int tmId,
const int limit,
const int offset) {
Logger::logString("full search for pattern", pattern);
boost::ptr_map<int,Concordia>::iterator it = _concordiasMap->find(tmId);
if (it != _concordiasMap->end()) {
Logger::log("Concordia got");
TokenizedSentence tokenizedPattern = it->second->tokenize(pattern, false, false);
Logger::log("sentence tokenized");
pattern = _lemmatizerFacade->lemmatizeIfNeeded(tokenizedPattern.getTokenizedSentence(), tmId);
Logger::log("sentence lemmatized");
FullSearchResult result = _unitDAO.getFullSearchResult(it->second->fullSearch(pattern, limit, offset, true), tokenizedPattern.getTokens().size());
Logger::log("full search result acquired");
jsonWriter.StartObject();
jsonWriter.String("status");
jsonWriter.String("success");