logic: implemented support for non-ascii characters in fulltext search

* fixed non-ascii characters not working in normal symbol search
* implemented support for non-ascii characters in fulltext search
* fixed fulltext search not working for symbols with lowest and highest character codes in a file
* using wstring in FullTextSearchIndex (causes this index to be dependent on text encoding selected in app settings)
* implemented rebuilding FullTextSearchIndex if used text encoding changed in app settings
* added utility lib
This commit is contained in:
mlangkabel
2018-02-12 20:01:20 +01:00
parent 713754e0e6
commit 919afad03b
16 changed files with 227 additions and 97 deletions
@@ -4,7 +4,7 @@
#include "utility/logging/logging.h"
#include "utility/tracing.h"
void FullTextSearchIndex::addFile(Id fileId, const std::string& file)
void FullTextSearchIndex::addFile(Id fileId, const std::wstring& file)
{
if( file.empty() )
{
@@ -20,7 +20,7 @@ void FullTextSearchIndex::addFile(Id fileId, const std::string& file)
m_files.push_back(fts_file);
}
std::vector<FullTextSearchResult> FullTextSearchIndex::searchForTerm(const std::string& term) const
std::vector<FullTextSearchResult> FullTextSearchIndex::searchForTerm(const std::wstring& term) const
{
TRACE();