def IsPhrase(node):
 text = GetQueryNodeText(node)
 return ((node.getType() == QueryParser.VALUE) and text.startswith('"') and text.endswith('"'))

def IsPhrase ( node ) : text = GetQueryNodeText ( node ) return ( ( node . getType ( ) == QueryParser . VALUE ) and text . startswith ( '"' ) and text . endswith ( '"' ) )
return true if node is the root of a text phrase .