Skip to content

Commit

Permalink
fixed SourceDocument to generate hits by block on Build
Browse files Browse the repository at this point in the history
fixed joined fields to skip end marker at field end
added test 146 on joined fields

git-svn-id: http://sphinxsearch.googlecode.com/svn/trunk@2487 8b96e2b9-35c5-2c16-bc47-5122d61876d4
  • Loading branch information
tomat committed Sep 17, 2010
1 parent 67c47f2 commit 0d5dd36
Show file tree
Hide file tree
Showing 9 changed files with 433 additions and 217 deletions.
10 changes: 8 additions & 2 deletions src/indexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1078,13 +1078,16 @@ bool DoIndex ( const CSphConfigSection & hIndex, const char * sIndexName, const
{
CSphString sError;
dSources[i]->SetDict ( &tDict );
if ( !dSources[i]->Connect ( sError ) || !dSources[i]->IterateHitsStart ( sError ) )
if ( !dSources[i]->Connect ( sError ) || !dSources[i]->IterateStart ( sError ) )
{
if ( !sError.IsEmpty() )
fprintf ( stdout, "ERROR: index '%s': %s\n", sIndexName, sError.cstr() );
continue;
}
while ( dSources[i]->IterateHitsNext ( sError ) && dSources[i]->m_tDocInfo.m_iDocID );
while ( dSources[i]->IterateDocument ( sError ) && dSources[i]->m_tDocInfo.m_iDocID )
while ( dSources[i]->IterateHits ( sError ) )
{
}
}
tDict.Save ( g_sBuildStops, g_iTopStops, g_bBuildFreqs );

Expand Down Expand Up @@ -1151,6 +1154,9 @@ bool DoIndex ( const CSphConfigSection & hIndex, const char * sIndexName, const
if ( !bOK )
fprintf ( stdout, "ERROR: index '%s': %s.\n", sIndexName, pIndex->GetLastError().cstr() );

if ( !pIndex->GetLastWarning().IsEmpty() )
fprintf ( stdout, "WARNING: index '%s': %s.\n", sIndexName, pIndex->GetLastWarning().cstr() );

pIndex->Unlock ();

SafeDelete ( pIndex );
Expand Down
Loading

0 comments on commit 0d5dd36

Please sign in to comment.