espeed / bulbs

A Python persistence framework for graph databases like Neo4j, OrientDB and Titan.

Home Page:http://bulbflow.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lookup Search problem

rlacerda83 opened this issue · comments

I have a problem in finding through properties .

In the example he cites :

This will return all the vertices que have a "name " property with a value of " James" :
g.vertices.index.lookup vertices = ( name = " James" ) .

I created a model called Product :

from bulbs.titan import Graph as Rexter
from bulbs.model import Node, NodeProxy, Relationship, build_data
from bulbs.property import String, Integer, DateTime
from bulbs.utils import current_datetime

# Nodes
class Product(Node):  
    element_type = "product"

    name = String(nullable=False)
    pid = Integer(nullable=False, indexed=True)
    view_count = Integer(default=0, nullable=False)
    created = DateTime(default=current_datetime, nullable=False)

And add with some information .

When i run g.vertices.index.lookup(pid =318) the return is as follows:

GET url: http://localhost:8182/graphs/graph/vertices?value=318&key=pid
GET body: None

If I am in the Gremlin and run g.V( 'pid ', 318) .map() it returns :

== > { created = 1437049813 , name = Gladiator (2000 ) , pid = 3578 , ELEMENT_TYPE = product, view_count = 0}

Why can not I get the vertex by Bulbs ?

Thanks!

+1 Looks like index lookup for integer properties isn't working, irrespective of the underlying DB.

Here's the mailing list post related to this issue : https://groups.google.com/forum/#!msg/gremlin-users/HmWNz83Ma3k/RbgOBMmOidoJ