logic: fixes for search

* set max best scored length for file paths
* fixed best score caching
* fixed namespace/package and node name split for search results
This commit is contained in:
Eberhard Graether
2017-09-07 16:43:20 +02:00
parent d62fdc2e11
commit 5f9a6d7046
3 changed files with 47 additions and 49 deletions
+2 -2
View File
@@ -587,7 +587,7 @@ std::vector<SearchMatch> PersistentStorage::getAutocompletionMatches(const std::
TRACE();
// search in indices
size_t maxResultsCount = 500;
size_t maxResultsCount = 100;
size_t maxBestScoredResultsLength = 100;
// create SearchMatches
@@ -716,7 +716,7 @@ std::vector<SearchMatch> PersistentStorage::getAutocompletionSymbolMatches(
std::vector<SearchMatch> PersistentStorage::getAutocompletionFileMatches(const std::string& query, size_t maxResultsCount) const
{
std::vector<SearchResult> results = m_fileIndex.search(query, Node::NODE_FILE, maxResultsCount);
std::vector<SearchResult> results = m_fileIndex.search(query, Node::NODE_FILE, maxResultsCount, 150);
// create SearchMatches
std::vector<SearchMatch> matches;