NAME
REST::Neo4p::Index - Neo4j index object
SYNOPSIS
$node_idx = REST::Neo4p::Index('node', 'my_node_index');
$rel_idx = REST::Neo4p::Index('relationship', 'my_rel_index');
$fulltext_idx = REST::Neo4p::Index('node', "my_ft_index,
{ type = 'fulltext',
provider = 'lucene' });
$node_idx->add_entry( $ShaggyNode, 'pet' => 'ScoobyDoo' );
@returned_nodes = $node_idx->find_entries('pet' => 'ScoobyDoo');
@returned_nodes = $node_idx->find_entries('pet:Scoob*');
$node_idx->remove_entry( $JosieNode, 'hair' => 'red' );
DESCRIPTION
REST::Neo4p::Index
objects represent Neo4j node and relationship indexes.
METHODS
- new()
-
$node_idx = REST::Neo4p::Index('node', 'my_node_index'); $rel_idx = REST::Neo4p::Index('relationship', 'my_rel_index'); $fulltext_idx = REST::Neo4p::Index('node', "my_ft_index, { type = 'fulltext', provider = 'lucene' });
Creates a new index of the type given in the first argument, with the name given in the second argument. The optional third argument is a hashref containing an index configuration as provided for in the Neo4j API.
- remove()
-
$index->remove()
- name()
-
$idx_name = $index->name()
- type()
-
if ($index->type eq 'node') { $index->add_entry( $node, $key ); }
- add_entry()
-
$index->add_entry( $node, $key )
- remove_entry()
-
$index->remove_entry($node); $index->remove_entry($node, $key); $index->remove_entry($node, $key => $value);
- find_entries()
-
@returned_nodes = $node_index->find_entries($key => $value); @returned_rels = $rel_index->find_entries('pet:Scoob*');
SEE ALSO
REST::Neo4p, REST::Neo4p::Relationship, REST::Neo4p::Node.
AUTHOR
Mark A. Jensen
CPAN ID: MAJENSEN
majensen -at- cpan -dot- org
LICENSE
Copyright (c) 2012 Mark A. Jensen. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.