Skip to content

Lookup Search problem #156

@rlacerda83

Description

@rlacerda83

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions