def get_indexed_node(manager, prop, value, node_type='Node', lookup_func='CONTAINS', legacy=True):
    """
    :param manager: Neo4jDBSessionManager
    :param prop: Indexed property
    :param value: Indexed value
    :param node_type: Label used for index
    :param lookup_func: STARTS WITH | CONTAINS | ENDS WITH
    :param legacy: Backwards compatibility

    :type manager: Neo4jDBSessionManager
    :type prop: str
    :type value: str
    :type node_type: str
    :type lookup_func: str
    :type legacy: bool

    :return: Dict or Node object
    :rtype: dict|Node
    """
    q = """
        MATCH (n:{label})
        WHERE LOWER(n.{prop}) {lookup_func} LOWER({{value}})
        RETURN n
        """.format(label=node_type, prop=prop, lookup_func=lookup_func)
    with manager.session as s:
        for result in s.run(q, {'value': value}):
            if legacy:
                yield result['n'].properties
            else:
                yield result['n']
def get_indexed_node ( manager , prop , value , node_type = 'Node' , lookup_func = 'CONTAINS' , legacy = True ) : q = """
        MATCH (n:{label})
        WHERE LOWER(n.{prop}) {lookup_func} LOWER({{value}})
        RETURN n
        """ . format ( label = node_type , prop = prop , lookup_func = lookup_func ) with manager . session as s : for result in s . run ( q , { 'value' : value } ) : if legacy : yield result [ 'n' ] . properties else : yield result [ 'n' ]
:param manager: Neo4jDBSessionManager
    :param prop: Indexed property
    :param value: Indexed value
    :param node_type: Label used for index
    :param lookup_func: STARTS WITH | CONTAINS | ENDS WITH
    :param legacy: Backwards compatibility

    :type manager: Neo4jDBSessionManager
    :type prop: str
    :type value: str
    :type node_type: str
    :type lookup_func: str
    :type legacy: bool

    :return: Dict or Node object
    :rtype: dict|Node