Skip to content

Commit

Permalink
Oops! Actual Multinear here, not in r2454
Browse files Browse the repository at this point in the history
git-svn-id: http://sphinxsearch.googlecode.com/svn/trunk@2455 8b96e2b9-35c5-2c16-bc47-5122d61876d4
  • Loading branch information
klirichek committed Aug 20, 2010
1 parent a9c9e80 commit 3ba8b41
Show file tree
Hide file tree
Showing 5 changed files with 200 additions and 471 deletions.
6 changes: 0 additions & 6 deletions src/sphinx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14005,7 +14005,6 @@ static void TransformNear ( XQNode_t ** ppNode )
assert ( pNode->m_dWords.GetLength()==0 );
CSphVector<XQNode_t*> dArgs;
int iStartFrom;
bool bTransformed = false;

// transform all (A B C) NEAR D into A NEAR B NEAR C NEAR D
do
Expand All @@ -14023,7 +14022,6 @@ static void TransformNear ( XQNode_t ** ppNode )
// we will remove the node anyway, so just replace it with 1-st child instead
pNode->m_dChildren[i] = pChild->m_dChildren[j];
iStartFrom = i+1;
bTransformed = true;
} else
dArgs.Add ( pChild->m_dChildren[j] );
pChild->m_dChildren.Reset();
Expand All @@ -14039,10 +14037,6 @@ static void TransformNear ( XQNode_t ** ppNode )
pNode->m_dChildren [ i + iStartFrom ] = dArgs[i];
}
} while ( iStartFrom!=0 );

// such a way we get not NEAR, but transitive Multinear
if ( bTransformed && pNode->m_dChildren.GetLength()>2 )
pNode->SetOp ( SPH_QUERY_MULTINEAR );
}

ARRAY_FOREACH ( i, pNode->m_dChildren )
Expand Down
1 change: 0 additions & 1 deletion src/sphinxquery.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ enum XQOperator_e
SPH_QUERY_PROXIMITY,
SPH_QUERY_QUORUM,
SPH_QUERY_NEAR,
SPH_QUERY_MULTINEAR,
SPH_QUERY_SENTENCE,
SPH_QUERY_PARAGRAPH
};
Expand Down
Loading

0 comments on commit 3ba8b41

Please sign in to comment.