public List<Object> executeLuceneQuery(EntityMetadata m, String luceneQuery)
    {
        log.info("Executing Lucene Query on Neo4J:" + luceneQuery);

        GraphDatabaseService graphDb = getConnection();
        List<Object> entities = new ArrayList<Object>();

        if (!indexer.isNodeAutoIndexingEnabled(graphDb) && m.isIndexable())
        {
            Index<Node> nodeIndex = graphDb.index().forNodes(m.getIndexName());

            IndexHits<Node> hits = nodeIndex.query(luceneQuery);
            addEntityFromIndexHits(m, entities, hits);
        }
        else
        {

            ReadableIndex<Node> autoNodeIndex = graphDb.index().getNodeAutoIndexer().getAutoIndex();
            IndexHits<Node> hits = autoNodeIndex.query(luceneQuery);
            addEntityFromIndexHits(m, entities, hits);

        }
        return entities;
    }
public List < Object > executeLuceneQuery ( EntityMetadata m , String luceneQuery ) { log . info ( "Executing Lucene Query on Neo4J:" + luceneQuery ) ; GraphDatabaseService graphDb = getConnection ( ) ; List < Object > entities = new ArrayList < Object > ( ) ; if ( ! indexer . isNodeAutoIndexingEnabled ( graphDb ) && m . isIndexable ( ) ) { Index < Node > nodeIndex = graphDb . index ( ) . forNodes ( m . getIndexName ( ) ) ; IndexHits < Node > hits = nodeIndex . query ( luceneQuery ) ; addEntityFromIndexHits ( m , entities , hits ) ; } else { ReadableIndex < Node > autoNodeIndex = graphDb . index ( ) . getNodeAutoIndexer ( ) . getAutoIndex ( ) ; IndexHits < Node > hits = autoNodeIndex . query ( luceneQuery ) ; addEntityFromIndexHits ( m , entities , hits ) ; } return entities ; }
Execute lucene query.

@param m
the m
@param luceneQuery
the lucene query
@return the list