Sha256: 256eaa4a1e9614feb410998a10c153bfb6670b75623499031c2edfe2f5d690c9

Contents?: true

Size: 1.12 KB

Versions: 14

Compression:

Stored size: 1.12 KB

Contents

module Neo4j

  module Index

    # Adds an index on the given property
    # Notice that you normally don't have to do that since you simply can declare
    # that the property and index should be updated automatically by using the class method #index.
    #
    # The index operation will take place immediately unlike when using the Neo4j::Index::ClassMethods::index
    # method which instead will guarantee that the neo4j database and the lucene database will be consistent.
    # It uses a two phase commit when the transaction is about to be committed.
    #
    # ==== See also
    # Neo4j::Index::ClassMethods::index
    #
    def add_index(field, value=self[field])
      self.class.add_index(wrapped_entity, field.to_s, value)
    end

    # Removes an index on the given property.
    # Just like #add_index this is normally not needed since you instead can declare it with the
    # #index class method instead.
    #
    # ==== See also
    # Neo4j::Index::ClassMethods::index
    # Neo4j::Index#add_index
    #
    def rm_index(field, value=self[field])
      self.class.rm_index(wrapped_entity, field.to_s, value)
    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
neo4j-1.0.0.beta.27-java lib/neo4j/index/index.rb
neo4j-1.0.0.beta.26-java lib/neo4j/index/index.rb
neo4j-1.0.0.beta.25-java lib/neo4j/index/index.rb
neo4j-1.0.0.beta.24-java lib/neo4j/index/index.rb
neo4j-1.0.0.beta.23-java lib/neo4j/index/index.rb
neo4j-1.0.0.beta.22-java lib/neo4j/index/index.rb
neo4j-1.0.0.beta.21-java lib/neo4j/index/index.rb
neo4j-1.0.0.beta.20 lib/neo4j/index/index.rb
neo4j-1.0.0.beta.19 lib/neo4j/index/index.rb
neo4j-1.0.0.beta.18 lib/neo4j/index/index.rb
neo4j-1.0.0.beta.17 lib/neo4j/index/index.rb
neo4j-1.0.0.beta.16 lib/neo4j/index/index.rb
neo4j-1.0.0.beta.15 lib/neo4j/index/index.rb
neo4j-1.0.0.beta.14 lib/neo4j/index/index.rb