Permalink
Browse files

fixed #273 total documents counter at disk chunk got affected by OPTI…

…MIZE command and breaks weight calculation; fixed tests 187, 255, 317; added regression to test 366
  • Loading branch information...
tomatolog committed Oct 17, 2018
1 parent fd686bf commit 4ffa623e9d357a3b0b441615089e211f92f8de32
@@ -18173,7 +18173,7 @@ bool CSphIndex_VLN::ParsedMultiQuery ( const CSphQuery * pQuery, CSphQueryResult
CSphQueryContext tCtx ( *pQuery );
tCtx.m_pProfile = pProfile;
tCtx.m_pLocalDocs = tArgs.m_pLocalDocs;
tCtx.m_iTotalDocs = tArgs.m_iTotalDocs;
tCtx.m_iTotalDocs = ( tArgs.m_iTotalDocs ? tArgs.m_iTotalDocs : m_tStats.m_iTotalDocuments );
if ( !tCtx.SetupCalc ( pResult, tMaxSorterSchema, m_tSchema, m_tMva.GetWritePtr(), m_bArenaProhibit, dSorterSchemas ) )
return false;
@@ -1184,7 +1184,7 @@ struct RtIndex_t : public ISphRtIndex, public ISphNoncopyable, public ISphWordli
void CopyDoc ( RtSegment_t * pSeg, RtDocWriter_t & tOutDoc, RtWord_t * pWord, const RtSegment_t * pSrc, const RtDoc_t * pDoc );
void SaveMeta ( int64_t iTID, const CSphFixedVector<int> & dChunkNames );
void SaveDiskHeader ( const char * sFilename, SphDocID_t iMinDocID, int iCheckpoints, SphOffset_t iCheckpointsPosition, DWORD iInfixBlocksOffset, int iInfixCheckpointWordsSize, DWORD uKillListSize, uint64_t uMinMaxSize, const ChunkStats_t & tStats ) const;
void SaveDiskHeader ( const char * sFilename, SphDocID_t iMinDocID, int iCheckpoints, SphOffset_t iCheckpointsPosition, DWORD iInfixBlocksOffset, int iInfixCheckpointWordsSize, DWORD uKillListSize, uint64_t uMinMaxSize, const ChunkStats_t & tStats, int64_t iTotalDocuments ) const;
void SaveDiskDataImpl ( const char * sFilename, const SphChunkGuard_t & tGuard, const ChunkStats_t & tStats ) const;
void SaveDiskChunk ( int64_t iTID, const SphChunkGuard_t & tGuard, const ChunkStats_t & tStats, bool bMoveRetired );
CSphIndex * LoadDiskChunk ( const char * sChunk, CSphString & sError ) const;
@@ -3767,7 +3767,7 @@ void RtIndex_t::SaveDiskDataImpl ( const char * sFilename, const SphChunkGuard_t
// header
SaveDiskHeader ( sFilename, iMinDocID, dCheckpoints.GetLength(), iCheckpointsPosition, (DWORD)iInfixBlockOffset, iInfixCheckpointWordsSize,
m_dDiskChunkKlist.GetLength(), uMinMaxOff, tStats );
m_dDiskChunkKlist.GetLength(), uMinMaxOff, tStats, iTotalDocs );
// cleanup
ARRAY_FOREACH ( i, pWordReaders )
@@ -3788,7 +3788,7 @@ void RtIndex_t::SaveDiskDataImpl ( const char * sFilename, const SphChunkGuard_t
void RtIndex_t::SaveDiskHeader ( const char * sFilename, SphDocID_t iMinDocID, int iCheckpoints,
SphOffset_t iCheckpointsPosition, DWORD iInfixBlocksOffset, int iInfixCheckpointWordsSize, DWORD uKillListSize, uint64_t uMinMaxSize,
const ChunkStats_t & tStats ) const
const ChunkStats_t & tStats, int64_t iTotalDocuments ) const
{
static const DWORD RT_INDEX_FORMAT_VERSION = 43; ///< my format version
@@ -3820,7 +3820,7 @@ void RtIndex_t::SaveDiskHeader ( const char * sFilename, SphDocID_t iMinDocID, i
tWriter.PutDword ( iInfixCheckpointWordsSize ); // m_iInfixCheckpointWordsSize, v.34+
// stats
tWriter.PutDword ( (DWORD)tStats.m_Stats.m_iTotalDocuments ); // FIXME? we don't expect over 4G docs per just 1 local index
tWriter.PutDword ( (DWORD)iTotalDocuments ); // FIXME? we don't expect over 4G docs per just 1 local index
tWriter.PutOffset ( tStats.m_Stats.m_iTotalBytes );
// FIXME!!! calc duplicates here to
tWriter.PutDword ( 0 ); // v.40+
@@ -6771,7 +6771,7 @@ bool RtIndex_t::MultiQuery ( const CSphQuery * pQuery, CSphQueryResult * pResult
// in case of local_idf set but no external hash no full-scan query and RT has disk chunks
const SmallStringHash_T<int64_t> * pLocalDocs = tArgs.m_pLocalDocs;
SmallStringHash_T<int64_t> hLocalDocs;
int64_t iTotalDocs = tArgs.m_iTotalDocs;
int64_t iTotalDocs = ( tArgs.m_iTotalDocs ? tArgs.m_iTotalDocs : m_tStats.m_iTotalDocuments );
bool bGotLocalDF = tArgs.m_bLocalDF;
if ( tArgs.m_bLocalDF && !tArgs.m_pLocalDocs && !pQuery->m_sQuery.IsEmpty() && tGuard.m_dDiskChunks.GetLength() )
{
@@ -1113,7 +1113,8 @@ class ExtRanker_c : public ISphRanker, public ISphZoneCheck
public:
// FIXME? hide and friend?
virtual SphZoneHit_e IsInZone ( int iZone, const ExtHit_t * pHit, int * pLastSpan );
virtual const CSphIndex * GetIndex() { return m_pIndex; }
const CSphIndex * GetIndex() { return m_pIndex; }
const CSphQueryContext * GetCtx() const { return m_pCtx; }
public:
CSphMatch m_dMatches[ExtNode_i::MAX_DOCS]; ///< exposed for caller
@@ -8436,7 +8437,7 @@ bool RankerState_Expr_fn<NEED_PACKEDFACTORS, HANDLE_DUPES>::Init ( int iFields,
m_fAvgDocLen += m_pFieldLens[i];
else
m_fAvgDocLen = 1.0f;
m_iTotalDocuments = pRanker->GetIndex()->GetStats().m_iTotalDocuments;
m_iTotalDocuments = pRanker->GetCtx()->m_iTotalDocs;
m_fAvgDocLen /= m_iTotalDocuments;
m_fParamK1 = 1.2f;
@@ -9493,9 +9494,7 @@ ISphRanker * sphCreateRanker ( const XQQuery_t & tXQ, const CSphQuery * pQuery,
int iMaxQpos = pRanker->GetQwords ( hQwords );
const int iQwords = hQwords.GetLength ();
int64_t iTotalDocuments = pIndex->GetStats().m_iTotalDocuments;
if ( tCtx.m_pLocalDocs )
iTotalDocuments = tCtx.m_iTotalDocs;
int64_t iTotalDocuments = tCtx.m_iTotalDocs;
CSphVector<const ExtQword_t *> dWords;
dWords.Reserve ( hQwords.GetLength() );
@@ -1 +1 @@
a:1:{i:0;a:33:{i:0;a:2:{s:8:"sphinxql";s:16:"SELECT * FROM rt";s:10:"total_rows";i:0;}i:1;a:3:{s:8:"sphinxql";s:18:"SELECT * FROM disk";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"gid";s:2:"11";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"gid";s:2:"11";}i:3;a:2:{s:2:"id";s:1:"4";s:3:"gid";s:2:"11";}}}i:2;a:3:{s:8:"sphinxql";s:38:"SELECT * FROM disk WHERE MATCH('thee')";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";}i:1;a:2:{s:2:"id";s:1:"3";s:3:"gid";s:2:"11";}}}i:3;a:3:{s:8:"sphinxql";s:39:"SELECT * FROM disk WHERE MATCH('under')";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:2:{s:2:"id";s:1:"4";s:3:"gid";s:2:"11";}}}i:4;a:2:{s:8:"sphinxql";s:31:"ATTACH INDEX disk TO RTINDEX rt";s:14:"total_affected";i:0;}i:5;a:3:{s:8:"sphinxql";s:16:"SELECT * FROM rt";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"gid";s:2:"11";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"gid";s:2:"11";}i:3;a:2:{s:2:"id";s:1:"4";s:3:"gid";s:2:"11";}}}i:6;a:3:{s:8:"sphinxql";s:18:"SELECT * FROM disk";s:5:"error";s:48:"unknown local index(es) 'disk' in search request";s:5:"errno";i:1064;}i:7;a:3:{s:8:"sphinxql";s:36:"SELECT * FROM rt WHERE MATCH('thee')";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";}i:1;a:2:{s:2:"id";s:1:"3";s:3:"gid";s:2:"11";}}}i:8;a:3:{s:8:"sphinxql";s:18:"DESC rt like '_i%'";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:2:{s:5:"Field";s:5:"title";s:4:"Type";s:5:"field";}i:1;a:2:{s:5:"Field";s:3:"gid";s:4:"Type";s:4:"uint";}}}i:9;a:2:{s:8:"sphinxql";s:76:"INSERT INTO rt ( id, gid, title ) VALUES ( 10, 22, 'I dub thee unforgiven' )";s:14:"total_affected";i:1;}i:10;a:3:{s:8:"sphinxql";s:36:"SELECT * FROM rt WHERE MATCH('thee')";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:2:"10";s:3:"gid";s:2:"22";}i:1;a:2:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"gid";s:2:"11";}}}i:11;a:2:{s:8:"sphinxql";s:100:"INSERT INTO rt ( id, gid, title ) VALUES ( 11, 22, 'under_score_again <stuff>but got here</stuff>' )";s:14:"total_affected";i:1;}i:12;a:3:{s:8:"sphinxql";s:37:"SELECT * FROM rt WHERE MATCH('under')";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:2:{s:2:"id";s:2:"11";s:3:"gid";s:2:"22";}i:1;a:2:{s:2:"id";s:1:"4";s:3:"gid";s:2:"11";}}}i:13;a:2:{s:8:"sphinxql";s:22:"SELECT * FROM rt_arena";s:10:"total_rows";i:0;}i:14;a:2:{s:8:"sphinxql";s:38:"ATTACH INDEX plain TO RTINDEX rt_arena";s:14:"total_affected";i:0;}i:15;a:3:{s:8:"sphinxql";s:52:"SELECT * FROM rt_arena where mva1=15 order by id asc";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:5:{s:2:"id";s:1:"1";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}i:1;a:5:{s:2:"id";s:1:"2";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}i:2;a:5:{s:2:"id";s:1:"3";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}i:3;a:5:{s:2:"id";s:1:"4";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}}}i:16;a:3:{s:8:"sphinxql";s:53:"SELECT * FROM rt_arena where mva1=55 order by id desc";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:5:{s:2:"id";s:1:"4";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}i:1;a:5:{s:2:"id";s:1:"3";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}i:2;a:5:{s:2:"id";s:1:"2";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}i:3;a:5:{s:2:"id";s:1:"1";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}}}i:17;a:3:{s:8:"sphinxql";s:22:"SELECT * FROM rt_arena";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:5:{s:2:"id";s:1:"1";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}i:1;a:5:{s:2:"id";s:1:"2";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}i:2;a:5:{s:2:"id";s:1:"3";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}i:3;a:5:{s:2:"id";s:1:"4";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}}}i:18;a:3:{s:8:"sphinxql";s:35:"SELECT * FROM rt WHERE MATCH('got')";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:2:{s:2:"id";s:1:"2";s:3:"gid";s:2:"11";}}}i:19;a:2:{s:8:"sphinxql";s:144:"INSERT INTO rt1 ( id, gid, title, body ) VALUES ( 1, 22, 'dust me', 'well' ), ( 5, 22, 'dure me', 'thee off' ), ( 6, 22, 'dub me', 'thee well' )";s:14:"total_affected";i:3;}i:20;a:2:{s:8:"sphinxql";s:30:"ATTACH INDEX a1 TO RTINDEX rt1";s:14:"total_affected";i:0;}i:21;a:3:{s:8:"sphinxql";s:17:"SELECT * FROM rt1";s:10:"total_rows";i:6;s:4:"rows";a:6:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"gid";s:2:"11";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"gid";s:2:"11";}i:3;a:2:{s:2:"id";s:1:"4";s:3:"gid";s:2:"11";}i:4;a:2:{s:2:"id";s:1:"5";s:3:"gid";s:2:"22";}i:5;a:2:{s:2:"id";s:1:"6";s:3:"gid";s:2:"22";}}}i:22;a:3:{s:8:"sphinxql";s:37:"SELECT * FROM rt1 WHERE MATCH('well')";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";}i:1;a:2:{s:2:"id";s:1:"3";s:3:"gid";s:2:"11";}i:2;a:2:{s:2:"id";s:1:"6";s:3:"gid";s:2:"22";}}}i:23;a:3:{s:8:"sphinxql";s:42:"SELECT * FROM rt1 WHERE MATCH('me | thee')";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:2:{s:2:"id";s:1:"5";s:3:"gid";s:2:"22";}i:1;a:2:{s:2:"id";s:1:"6";s:3:"gid";s:2:"22";}i:2;a:2:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";}i:3;a:2:{s:2:"id";s:1:"3";s:3:"gid";s:2:"11";}}}i:24;a:2:{s:8:"sphinxql";s:35:"ATTACH INDEX disk1 TO RTINDEX rt_d1";s:14:"total_affected";i:0;}i:25;a:2:{s:8:"sphinxql";s:35:"ATTACH INDEX disk2 TO RTINDEX rt_d1";s:14:"total_affected";i:0;}i:26;a:2:{s:8:"sphinxql";s:35:"ATTACH INDEX disk3 TO RTINDEX rt_d1";s:14:"total_affected";i:0;}i:27;a:3:{s:8:"sphinxql";s:19:"SELECT * FROM rt_d1";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"gid";s:2:"11";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"gid";s:2:"11";}i:3;a:2:{s:2:"id";s:1:"4";s:3:"gid";s:2:"11";}}}i:28;a:2:{s:8:"sphinxql";s:93:"INSERT INTO rt_trunc ( id, gid1, gid2, title ) VALUES ( 10, 22, 33, 'I dub thee unforgiven' )";s:14:"total_affected";i:1;}i:29;a:3:{s:8:"sphinxql";s:43:"ATTACH INDEX disk_trunc TO RTINDEX rt_trunc";s:5:"error";s:87:"ATTACH currently requires same tokenizer settings (RT-side support not implemented yet)";s:5:"errno";i:1064;}i:30;a:3:{s:8:"sphinxql";s:22:"SELECT * FROM rt_trunc";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:3:{s:2:"id";s:2:"10";s:4:"gid1";s:2:"22";s:4:"gid2";s:2:"33";}}}i:31;a:2:{s:8:"sphinxql";s:57:"ATTACH INDEX disk_trunc TO RTINDEX rt_trunc WITH TRUNCATE";s:14:"total_affected";i:0;}i:32;a:3:{s:8:"sphinxql";s:22:"SELECT * FROM rt_trunc";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"gid";s:2:"11";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"gid";s:2:"11";}i:3;a:2:{s:2:"id";s:1:"4";s:3:"gid";s:2:"11";}}}}}
a:1:{i:0;a:33:{i:0;a:2:{s:8:"sphinxql";s:16:"SELECT * FROM rt";s:10:"total_rows";i:0;}i:1;a:3:{s:8:"sphinxql";s:18:"SELECT * FROM disk";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"gid";s:2:"11";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"gid";s:2:"11";}i:3;a:2:{s:2:"id";s:1:"4";s:3:"gid";s:2:"11";}}}i:2;a:3:{s:8:"sphinxql";s:38:"SELECT * FROM disk WHERE MATCH('thee')";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";}i:1;a:2:{s:2:"id";s:1:"3";s:3:"gid";s:2:"11";}}}i:3;a:3:{s:8:"sphinxql";s:56:"SELECT * FROM disk WHERE MATCH('under') order by id desc";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:2:{s:2:"id";s:1:"4";s:3:"gid";s:2:"11";}}}i:4;a:2:{s:8:"sphinxql";s:31:"ATTACH INDEX disk TO RTINDEX rt";s:14:"total_affected";i:0;}i:5;a:3:{s:8:"sphinxql";s:16:"SELECT * FROM rt";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"gid";s:2:"11";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"gid";s:2:"11";}i:3;a:2:{s:2:"id";s:1:"4";s:3:"gid";s:2:"11";}}}i:6;a:3:{s:8:"sphinxql";s:18:"SELECT * FROM disk";s:5:"error";s:48:"unknown local index(es) 'disk' in search request";s:5:"errno";i:1064;}i:7;a:3:{s:8:"sphinxql";s:36:"SELECT * FROM rt WHERE MATCH('thee')";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";}i:1;a:2:{s:2:"id";s:1:"3";s:3:"gid";s:2:"11";}}}i:8;a:3:{s:8:"sphinxql";s:18:"DESC rt like '_i%'";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:2:{s:5:"Field";s:5:"title";s:4:"Type";s:5:"field";}i:1;a:2:{s:5:"Field";s:3:"gid";s:4:"Type";s:4:"uint";}}}i:9;a:2:{s:8:"sphinxql";s:76:"INSERT INTO rt ( id, gid, title ) VALUES ( 10, 22, 'I dub thee unforgiven' )";s:14:"total_affected";i:1;}i:10;a:3:{s:8:"sphinxql";s:36:"SELECT * FROM rt WHERE MATCH('thee')";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:2:"10";s:3:"gid";s:2:"22";}i:1;a:2:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"gid";s:2:"11";}}}i:11;a:2:{s:8:"sphinxql";s:100:"INSERT INTO rt ( id, gid, title ) VALUES ( 11, 22, 'under_score_again <stuff>but got here</stuff>' )";s:14:"total_affected";i:1;}i:12;a:3:{s:8:"sphinxql";s:54:"SELECT * FROM rt WHERE MATCH('under') order by id desc";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:2:{s:2:"id";s:2:"11";s:3:"gid";s:2:"22";}i:1;a:2:{s:2:"id";s:1:"4";s:3:"gid";s:2:"11";}}}i:13;a:2:{s:8:"sphinxql";s:22:"SELECT * FROM rt_arena";s:10:"total_rows";i:0;}i:14;a:2:{s:8:"sphinxql";s:38:"ATTACH INDEX plain TO RTINDEX rt_arena";s:14:"total_affected";i:0;}i:15;a:3:{s:8:"sphinxql";s:52:"SELECT * FROM rt_arena where mva1=15 order by id asc";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:5:{s:2:"id";s:1:"1";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}i:1;a:5:{s:2:"id";s:1:"2";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}i:2;a:5:{s:2:"id";s:1:"3";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}i:3;a:5:{s:2:"id";s:1:"4";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}}}i:16;a:3:{s:8:"sphinxql";s:53:"SELECT * FROM rt_arena where mva1=55 order by id desc";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:5:{s:2:"id";s:1:"4";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}i:1;a:5:{s:2:"id";s:1:"3";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}i:2;a:5:{s:2:"id";s:1:"2";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}i:3;a:5:{s:2:"id";s:1:"1";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}}}i:17;a:3:{s:8:"sphinxql";s:22:"SELECT * FROM rt_arena";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:5:{s:2:"id";s:1:"1";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}i:1;a:5:{s:2:"id";s:1:"2";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}i:2;a:5:{s:2:"id";s:1:"3";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}i:3;a:5:{s:2:"id";s:1:"4";s:4:"str1";s:9:"dummy for";s:4:"mva1";s:8:"15,20,55";s:4:"mva2";s:0:"";s:3:"gid";s:2:"11";}}}i:18;a:3:{s:8:"sphinxql";s:35:"SELECT * FROM rt WHERE MATCH('got')";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:2:{s:2:"id";s:1:"2";s:3:"gid";s:2:"11";}}}i:19;a:2:{s:8:"sphinxql";s:144:"INSERT INTO rt1 ( id, gid, title, body ) VALUES ( 1, 22, 'dust me', 'well' ), ( 5, 22, 'dure me', 'thee off' ), ( 6, 22, 'dub me', 'thee well' )";s:14:"total_affected";i:3;}i:20;a:2:{s:8:"sphinxql";s:30:"ATTACH INDEX a1 TO RTINDEX rt1";s:14:"total_affected";i:0;}i:21;a:3:{s:8:"sphinxql";s:17:"SELECT * FROM rt1";s:10:"total_rows";i:6;s:4:"rows";a:6:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"gid";s:2:"11";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"gid";s:2:"11";}i:3;a:2:{s:2:"id";s:1:"4";s:3:"gid";s:2:"11";}i:4;a:2:{s:2:"id";s:1:"5";s:3:"gid";s:2:"22";}i:5;a:2:{s:2:"id";s:1:"6";s:3:"gid";s:2:"22";}}}i:22;a:3:{s:8:"sphinxql";s:37:"SELECT * FROM rt1 WHERE MATCH('well')";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";}i:1;a:2:{s:2:"id";s:1:"3";s:3:"gid";s:2:"11";}i:2;a:2:{s:2:"id";s:1:"6";s:3:"gid";s:2:"22";}}}i:23;a:3:{s:8:"sphinxql";s:42:"SELECT * FROM rt1 WHERE MATCH('me | thee')";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:2:{s:2:"id";s:1:"5";s:3:"gid";s:2:"22";}i:1;a:2:{s:2:"id";s:1:"6";s:3:"gid";s:2:"22";}i:2;a:2:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";}i:3;a:2:{s:2:"id";s:1:"3";s:3:"gid";s:2:"11";}}}i:24;a:2:{s:8:"sphinxql";s:35:"ATTACH INDEX disk1 TO RTINDEX rt_d1";s:14:"total_affected";i:0;}i:25;a:2:{s:8:"sphinxql";s:35:"ATTACH INDEX disk2 TO RTINDEX rt_d1";s:14:"total_affected";i:0;}i:26;a:2:{s:8:"sphinxql";s:35:"ATTACH INDEX disk3 TO RTINDEX rt_d1";s:14:"total_affected";i:0;}i:27;a:3:{s:8:"sphinxql";s:19:"SELECT * FROM rt_d1";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"gid";s:2:"11";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"gid";s:2:"11";}i:3;a:2:{s:2:"id";s:1:"4";s:3:"gid";s:2:"11";}}}i:28;a:2:{s:8:"sphinxql";s:93:"INSERT INTO rt_trunc ( id, gid1, gid2, title ) VALUES ( 10, 22, 33, 'I dub thee unforgiven' )";s:14:"total_affected";i:1;}i:29;a:3:{s:8:"sphinxql";s:43:"ATTACH INDEX disk_trunc TO RTINDEX rt_trunc";s:5:"error";s:87:"ATTACH currently requires same tokenizer settings (RT-side support not implemented yet)";s:5:"errno";i:1064;}i:30;a:3:{s:8:"sphinxql";s:22:"SELECT * FROM rt_trunc";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:3:{s:2:"id";s:2:"10";s:4:"gid1";s:2:"22";s:4:"gid2";s:2:"33";}}}i:31;a:2:{s:8:"sphinxql";s:57:"ATTACH INDEX disk_trunc TO RTINDEX rt_trunc WITH TRUNCATE";s:14:"total_affected";i:0;}i:32;a:3:{s:8:"sphinxql";s:22:"SELECT * FROM rt_trunc";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"gid";s:2:"11";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"gid";s:2:"11";}i:3;a:2:{s:2:"id";s:1:"4";s:3:"gid";s:2:"11";}}}}}
Oops, something went wrong.

0 comments on commit 4ffa623

Please sign in to comment.