Mohamed Taher Alrefaie
Mohamed Taher Alrefaie

Reputation: 16233

How to query all values in vertices using elasticsearch in Tinkerpop3 graph

I have a graph that I want to to query vertices (full text search) by text that might occur in any of the keys in each vertex. How to do that?

I use Titan 0.9.0-M2 and Tinkerpop 3. The indexing backend is Elasticsearch.

Upvotes: 1

Views: 354

Answers (1)

Daniel Kuppitz
Daniel Kuppitz

Reputation: 10904

Let's say your index is called vertices, then you would do:

graph.indexQuery("vertices","v.*:term").vertices()

Here's an example over the Graph of the Gods:

gremlin> graph.indexQuery("edges", "e.*:loves").edges()*.getElement()*.value("reason")
==>loves waves
==>loves fresh breezes

Upvotes: 1

Related Questions