bento_meta.mdb.searchable

mdb.searchable Subclass of class:bento_meta.mdb.MDB to support searching fulltext indices on an MDB Note: certain fulltext indexes on certain MDB nodes and properties must be present in the Neo4j instance: - entityHandles - termValue - termDefn - termValueDefn

Module Contents

Classes

SearchableMDB

class bento_meta.mdb.searchable.SearchableMDB(*args, **kwargs)[source]

Bases: bento_meta.mdb.MDB

available_indexes()[source]

Fulltext indexes present in database. Returns { <index_name> : { entity_type:<NODE|RELATIONSHIP>, entities:[<labels>], properties:[ [<props>] ] } }

query_index(index, qstring, skip=None, limit=None)[source]

Query a named fulltext index of nodes or relationships. Returns [ {ent:{}, label:<label>, score:<lucene score>} ].

search_entity_handles(qstring)[source]

Fulltext search of qstring over node, relationship, and property handles. Returns { node:[ {ent:<entity dict>,score:<lucene score>},… ], relationship:[ <…> ], property:[ <…> ] }

search_terms(qstring, search_values=True, search_definitions=True)[source]

Fulltext for qstring over terms, by value, definition, or both (default). Returns [ { ent:<term dict>, score:<lucene score> } ]}