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:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user