Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/sphinx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11338,6 +11338,7 @@ int CSphIndex_VLN::Build ( const CSphVector<CSphSource*> & dSources, int iMemory
}

bool bHaveFieldMVAs = false;
bool bOnlyFieldMVAs = true;
int iFieldLens = m_tSchema.GetAttrId_FirstFieldLen();
CSphVector<int> dMvaIndexes;
CSphVector<CSphAttrLocator> dMvaLocators;
Expand All @@ -11361,6 +11362,8 @@ int CSphIndex_VLN::Build ( const CSphVector<CSphSource*> & dSources, int iMemory
case SPH_ATTR_UINT32SET:
if ( tCol.m_eSrc==SPH_ATTRSRC_FIELD )
bHaveFieldMVAs = true;
else
bOnlyFieldMVAs = false;
dMvaIndexes.Add ( i );
dMvaLocators.Add ( tCol.m_tLocator );
break;
Expand All @@ -11385,6 +11388,8 @@ int CSphIndex_VLN::Build ( const CSphVector<CSphSource*> & dSources, int iMemory
continue;
if ( tCol.m_eSrc==SPH_ATTRSRC_FIELD )
bHaveFieldMVAs = true;
else
bOnlyFieldMVAs = false;
dMvaIndexes.Add ( i );
dMvaLocators.Add ( tCol.m_tLocator );
}
Expand Down Expand Up @@ -12120,7 +12125,8 @@ int CSphIndex_VLN::Build ( const CSphVector<CSphSource*> & dSources, int iMemory
}

// this source is over, disconnect and update stats
pSource->Disconnect ();
if ( bOnlyFieldMVAs )
pSource->Disconnect ();

m_tStats.m_iTotalDocuments += pSource->GetStats().m_iTotalDocuments;
m_tStats.m_iTotalBytes += pSource->GetStats().m_iTotalBytes;
Expand Down