1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-21 00:09:47 +01:00

* More debug output in FuzzyIndex.

This commit is contained in:
Christian Muehlhaeuser 2014-10-03 04:24:49 +02:00
parent 7543b776d8
commit 1d69880b31
2 changed files with 7 additions and 5 deletions

View File

@ -88,7 +88,7 @@ FuzzyIndex::~FuzzyIndex()
bool
FuzzyIndex::wipeIndex()
{
tLog( LOGVERBOSE ) << "Wiping fuzzy index:" << m_lucenePath;
tDebug() << "Wiping fuzzy index:" << m_lucenePath;
beginIndexing();
endIndexing();
@ -112,10 +112,10 @@ FuzzyIndex::beginIndexing()
try
{
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Starting indexing:" << m_lucenePath;
tDebug() << Q_FUNC_INFO << "Starting indexing:" << m_lucenePath;
if ( m_luceneReader != 0 )
{
tDebug( LOGVERBOSE ) << "Deleting old lucene stuff.";
tDebug() << "Deleting old lucene stuff.";
m_luceneSearcher->close();
m_luceneReader->close();
@ -125,7 +125,7 @@ FuzzyIndex::beginIndexing()
m_luceneReader = 0;
}
tDebug( LOGVERBOSE ) << "Creating new index writer.";
tDebug() << "Creating new index writer.";
m_luceneWriter = new IndexWriter( m_luceneDir, m_analyzer, true );
}
catch( CLuceneError& error )
@ -139,7 +139,7 @@ FuzzyIndex::beginIndexing()
void
FuzzyIndex::endIndexing()
{
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Finishing indexing:" << m_lucenePath;
tDebug() << Q_FUNC_INFO << "Finishing indexing:" << m_lucenePath;
m_luceneWriter->optimize();
m_luceneWriter->close();
delete m_luceneWriter;
@ -215,6 +215,7 @@ FuzzyIndex::deleteIndex()
TomahawkUtils::removeDirectory( m_lucenePath );
}
void
FuzzyIndex::updateIndex()
{

View File

@ -764,6 +764,7 @@ JSResolverHelper::indexDataFromVariant( const QVariantMap &map, struct Tomahawk:
void
JSResolverHelper::createFuzzyIndex( const QVariantList& list )
{
tDebug() << Q_FUNC_INFO;
if ( m_resolver->d_func()->fuzzyIndex.isNull() )
{
m_resolver->d_func()->fuzzyIndex.reset( new FuzzyIndex( m_resolver, m_resolver->d_func()->accountId + ".lucene" , true ) );