Don't analyse files in own clucene index directories.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39179 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -68,13 +68,6 @@ FullTextAnalyser::AnalyseEntry(const entry_ref& ref)
|
|||||||
{
|
{
|
||||||
if (!_InterestingEntry(ref))
|
if (!_InterestingEntry(ref))
|
||||||
return;
|
return;
|
||||||
BPath path(&ref);
|
|
||||||
if (BString(path.Path()).FindFirst(fDataBasePath.Path()) == 0) {
|
|
||||||
STRACE("In database path %s\n", path.Path());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (BString(path.Path()).FindFirst("/boot/common/cache/tmp") == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
//STRACE("FullTextAnalyser AnalyseEntry: %s %s\n", ref.name, path.Path());
|
//STRACE("FullTextAnalyser AnalyseEntry: %s %s\n", ref.name, path.Path());
|
||||||
fWriteDataBase->AddDocument(ref);
|
fWriteDataBase->AddDocument(ref);
|
||||||
@@ -88,6 +81,8 @@ FullTextAnalyser::AnalyseEntry(const entry_ref& ref)
|
|||||||
void
|
void
|
||||||
FullTextAnalyser::DeleteEntry(const entry_ref& ref)
|
FullTextAnalyser::DeleteEntry(const entry_ref& ref)
|
||||||
{
|
{
|
||||||
|
if (!_InterestingEntry(ref))
|
||||||
|
return;
|
||||||
STRACE("FullTextAnalyser DeleteEntry: %s\n", ref.name);
|
STRACE("FullTextAnalyser DeleteEntry: %s\n", ref.name);
|
||||||
fWriteDataBase->RemoveDocument(ref);
|
fWriteDataBase->RemoveDocument(ref);
|
||||||
}
|
}
|
||||||
@@ -131,9 +126,11 @@ FullTextAnalyser::_InterestingEntry(const entry_ref& ref)
|
|||||||
bool
|
bool
|
||||||
FullTextAnalyser::_IsInIndexDirectory(const entry_ref& ref)
|
FullTextAnalyser::_IsInIndexDirectory(const entry_ref& ref)
|
||||||
{
|
{
|
||||||
BEntry entry(&ref);
|
BPath path(&ref);
|
||||||
BDirectory dataBaseDir(fDataBasePath.Path());
|
if (BString(path.Path()).FindFirst(fDataBasePath.Path()) == 0)
|
||||||
if (dataBaseDir.Contains(&entry))
|
return true;
|
||||||
|
|
||||||
|
if (BString(path.Path()).FindFirst("/boot/common/cache/tmp") == 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user