mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-29 20:22:30 +01:00
* More debug output in FuzzyIndex.
This commit is contained in:
parent
7543b776d8
commit
1d69880b31
src/libtomahawk
@ -88,7 +88,7 @@ FuzzyIndex::~FuzzyIndex()
|
|||||||
bool
|
bool
|
||||||
FuzzyIndex::wipeIndex()
|
FuzzyIndex::wipeIndex()
|
||||||
{
|
{
|
||||||
tLog( LOGVERBOSE ) << "Wiping fuzzy index:" << m_lucenePath;
|
tDebug() << "Wiping fuzzy index:" << m_lucenePath;
|
||||||
beginIndexing();
|
beginIndexing();
|
||||||
endIndexing();
|
endIndexing();
|
||||||
|
|
||||||
@ -112,10 +112,10 @@ FuzzyIndex::beginIndexing()
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Starting indexing:" << m_lucenePath;
|
tDebug() << Q_FUNC_INFO << "Starting indexing:" << m_lucenePath;
|
||||||
if ( m_luceneReader != 0 )
|
if ( m_luceneReader != 0 )
|
||||||
{
|
{
|
||||||
tDebug( LOGVERBOSE ) << "Deleting old lucene stuff.";
|
tDebug() << "Deleting old lucene stuff.";
|
||||||
|
|
||||||
m_luceneSearcher->close();
|
m_luceneSearcher->close();
|
||||||
m_luceneReader->close();
|
m_luceneReader->close();
|
||||||
@ -125,7 +125,7 @@ FuzzyIndex::beginIndexing()
|
|||||||
m_luceneReader = 0;
|
m_luceneReader = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
tDebug( LOGVERBOSE ) << "Creating new index writer.";
|
tDebug() << "Creating new index writer.";
|
||||||
m_luceneWriter = new IndexWriter( m_luceneDir, m_analyzer, true );
|
m_luceneWriter = new IndexWriter( m_luceneDir, m_analyzer, true );
|
||||||
}
|
}
|
||||||
catch( CLuceneError& error )
|
catch( CLuceneError& error )
|
||||||
@ -139,7 +139,7 @@ FuzzyIndex::beginIndexing()
|
|||||||
void
|
void
|
||||||
FuzzyIndex::endIndexing()
|
FuzzyIndex::endIndexing()
|
||||||
{
|
{
|
||||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Finishing indexing:" << m_lucenePath;
|
tDebug() << Q_FUNC_INFO << "Finishing indexing:" << m_lucenePath;
|
||||||
m_luceneWriter->optimize();
|
m_luceneWriter->optimize();
|
||||||
m_luceneWriter->close();
|
m_luceneWriter->close();
|
||||||
delete m_luceneWriter;
|
delete m_luceneWriter;
|
||||||
@ -215,6 +215,7 @@ FuzzyIndex::deleteIndex()
|
|||||||
TomahawkUtils::removeDirectory( m_lucenePath );
|
TomahawkUtils::removeDirectory( m_lucenePath );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
FuzzyIndex::updateIndex()
|
FuzzyIndex::updateIndex()
|
||||||
{
|
{
|
||||||
|
@ -764,6 +764,7 @@ JSResolverHelper::indexDataFromVariant( const QVariantMap &map, struct Tomahawk:
|
|||||||
void
|
void
|
||||||
JSResolverHelper::createFuzzyIndex( const QVariantList& list )
|
JSResolverHelper::createFuzzyIndex( const QVariantList& list )
|
||||||
{
|
{
|
||||||
|
tDebug() << Q_FUNC_INFO;
|
||||||
if ( m_resolver->d_func()->fuzzyIndex.isNull() )
|
if ( m_resolver->d_func()->fuzzyIndex.isNull() )
|
||||||
{
|
{
|
||||||
m_resolver->d_func()->fuzzyIndex.reset( new FuzzyIndex( m_resolver, m_resolver->d_func()->accountId + ".lucene" , true ) );
|
m_resolver->d_func()->fuzzyIndex.reset( new FuzzyIndex( m_resolver, m_resolver->d_func()->accountId + ".lucene" , true ) );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user