data: increased autocomplete performance by caching and limiting results to 100
This commit is contained in:
@@ -32,8 +32,7 @@ public:
|
||||
virtual NameHierarchy getNameHierarchyForNodeWithId(Id id) const = 0;
|
||||
virtual Node::NodeType getNodeTypeForNodeWithId(Id id) const = 0;
|
||||
|
||||
virtual std::vector<SearchMatch> getAutocompletionMatches(
|
||||
const std::string& query, const std::string& word) const = 0;
|
||||
virtual std::vector<SearchMatch> getAutocompletionMatches(const std::string& query) const = 0;
|
||||
virtual std::vector<SearchMatch> getSearchMatchesForTokenIds(const std::vector<Id>& tokenIds) const = 0;
|
||||
|
||||
virtual std::shared_ptr<Graph> getGraphForActiveTokenIds(const std::vector<Id>& tokenIds) const = 0;
|
||||
|
||||
@@ -82,13 +82,11 @@ NameHierarchy StorageAccessProxy::getNameHierarchyForNodeWithId(Id id) const
|
||||
return NameHierarchy();
|
||||
}
|
||||
|
||||
std::vector<SearchMatch> StorageAccessProxy::getAutocompletionMatches(
|
||||
const std::string& query,
|
||||
const std::string& word
|
||||
) const {
|
||||
std::vector<SearchMatch> StorageAccessProxy::getAutocompletionMatches(const std::string& query) const
|
||||
{
|
||||
if (hasSubject())
|
||||
{
|
||||
return m_subject->getAutocompletionMatches(query, word);
|
||||
return m_subject->getAutocompletionMatches(query);
|
||||
}
|
||||
|
||||
return std::vector<SearchMatch>();
|
||||
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
virtual NameHierarchy getNameHierarchyForNodeWithId(Id id) const;
|
||||
virtual Node::NodeType getNodeTypeForNodeWithId(Id id) const;
|
||||
|
||||
virtual std::vector<SearchMatch> getAutocompletionMatches(const std::string& query, const std::string& word) const;
|
||||
virtual std::vector<SearchMatch> getAutocompletionMatches(const std::string& query) const;
|
||||
virtual std::vector<SearchMatch> getSearchMatchesForTokenIds(const std::vector<Id>& tokenIds) const;
|
||||
|
||||
virtual std::shared_ptr<Graph> getGraphForActiveTokenIds(const std::vector<Id>& tokenIds) const;
|
||||
|
||||
Reference in New Issue
Block a user