0

プロパティで頂点を見つけるのに問題があります。

彼が引用するドキュメントで:

これにより、値が "James" の "name" プロパティを持つすべての頂点が返されます: g.vertices.index.lookup vertices = ( name = "James" ) 。

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)

そして、いくつかの情報を追加します。

リターンを実行g.vertices.index.lookup(pid =318)すると、次のようになります。

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

Gremlin で実行すると、次のようg.V('pid', 318).map()に返されます。

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

Bulbs で頂点を取得できないのはなぜですか?

ありがとう!

4

1 に答える 1