logic: Fixed issues in search

* fixed bad search performance when rescoring
* fixed commands had no text in autocompletions
* no autocompletions when entering fulltext search query
* check query actuality before processing autocompletions
This commit is contained in:
Eberhard Graether
2016-11-15 08:12:14 -08:00
parent 96ee2b997c
commit a35e8a53de
10 changed files with 38 additions and 5 deletions
@@ -71,8 +71,16 @@ void SearchController::handleMessage(MessageSearchAutocomplete* message)
{
TRACE("search autocomplete");
SearchView* view = getView();
// Don't autocomplete if autocompletion request is not up-to-date anymore
if (message->query != view->getQuery())
{
return;
}
LOG_INFO("autocomplete string: \"" + message->query + "\"");
getView()->setAutocompletionList(m_storageAccess->getAutocompletionMatches(message->query));
view->setAutocompletionList(m_storageAccess->getAutocompletionMatches(message->query));
}
void SearchController::handleMessage(MessageSearchFullText* message)
+2
View File
@@ -15,6 +15,8 @@ public:
virtual std::string getName() const;
virtual std::string getQuery() const = 0;
virtual void setMatches(const std::vector<SearchMatch>& matches) = 0;
virtual void setFocus() = 0;