Class: Pacer::Neo4j::Graph

Inherits:
PacerGraph
  • Object
show all
Defined in:
lib/pacer-neo4j/graph.rb,
lib/pacer-neo4j/lucene_filter.rb

Instance Method Summary collapse

Instance Method Details

#key_index_cache(type, name, size = :undefined) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/pacer-neo4j/graph.rb', line 15

def key_index_cache(type, name, size = :undefined)
  if size == :undefined
    lucene_auto_index(type).getCacheCapacity name
  else
    lucene_auto_index(type).setCacheCapacity name, size
  end
end

#lucene(query, opts = {}) ⇒ Object



4
5
6
7
8
9
# File 'lib/pacer-neo4j/lucene_filter.rb', line 4

def lucene(query, opts = {})
  opts = { back: self, element_type: :vertex }.merge opts
  chain_route(opts.merge(query: query,
                         filter: :lucene,
                         index: choose_index(opts)))
end

#safe_transactionsObject



11
12
13
# File 'lib/pacer-neo4j/graph.rb', line 11

def safe_transactions
  blueprints_graph.getCheckElementsInTransaction
end

#safe_transactions=(b) ⇒ Object

I’m not sure exactly what this impacts but if it is false, many Pacer tests fail.

Presumably Neo4j is faster with it set to false.



7
8
9
# File 'lib/pacer-neo4j/graph.rb', line 7

def safe_transactions=(b)
  blueprints_graph.setCheckElementsInTransaction b
end