CQueryNearNode is a class which is used to search two or three nodes, which are inside some text period of length CQueryNearNode::m_Distance. It other words it is an implementation of "near" operator: for example, NEAR(a,b,2). More...
#include <QueryNode.h>
CQueryNearNode is a class which is used to search two or three nodes, which are inside some text period of length CQueryNearNode::m_Distance. It other words it is an implementation of "near" operator: for example, NEAR(a,b,2).
CQueryNearNode::CQueryNearNode | ( | ) |
References m_pChild1, m_pChild2, and m_pMiddleChild.
CQueryNearNode::~CQueryNearNode | ( | ) | [virtual] |
References m_pChild1, m_pChild2, and m_pMiddleChild.
bool CQueryNearNode::ReadDistanceFromString | ( | const char * | s | ) | [private] |
read the text distance from a string, return false if it is to large
References m_Distance, and MaxDistanceForNear.
Referenced by Create().
bool CQueryNearNode::Create | ( | const CConcHolder * | pHolder, | |
const char * | distance_str, | |||
CQueryNode * | child1, | |||
CQueryNode * | child2, | |||
CQueryNode * | child3 = 0 | |||
) |
create the node during yacc parsing
References CQueryNode::m_bAtomic, m_pChild1, m_pChild2, m_pMiddleChild, ReadDistanceFromString(), and CQueryNode::SetHolder().
Referenced by yyqparse().
void CQueryNearNode::Evaluate | ( | ) | [virtual] |
Reimplemented from CQueryNode.
References CQueryNode::AddOccurrences(), CQueryNode::ClearAndReserveOccurrences(), CQueryNode::ConvertOccurrencesToHitsForPatterns(), CQueryNode::EvaluateWithoutHits(), CQueryNode::m_ChunkLengths, m_Distance, CQueryNode::m_Occurrences, m_pChild1, m_pChild2, and m_pMiddleChild.
size_t CQueryNearNode::GetNodeFrequenceByNodeIndex | ( | size_t | NodeIndex | ) | const [virtual] |
Reimplemented from CQueryNode.
References CQueryNode::GetNodeFrequenceByNodeIndex(), m_pChild1, m_pChild2, and m_pMiddleChild.
CQueryNode* CQueryNearNode::m_pChild1 [private] |
the first child
Referenced by CQueryNearNode(), Create(), Evaluate(), GetNodeFrequenceByNodeIndex(), and ~CQueryNearNode().
CQueryNode* CQueryNearNode::m_pMiddleChild [private] |
the middle child (can be null)
Referenced by CQueryNearNode(), Create(), Evaluate(), GetNodeFrequenceByNodeIndex(), and ~CQueryNearNode().
CQueryNode* CQueryNearNode::m_pChild2 [private] |
the second child
Referenced by CQueryNearNode(), Create(), Evaluate(), GetNodeFrequenceByNodeIndex(), and ~CQueryNearNode().
BYTE CQueryNearNode::m_Distance [private] |
the distance between the first child and the second child
Referenced by Evaluate(), and ReadDistanceFromString().