Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7168931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:52:55+00:00 2026-05-28T14:52:55+00:00

I am opening a graph using: g = new Neo4jGraph(‘…path…’); then adding a vertex

  • 0

I am opening a graph using:

g = new Neo4jGraph('...path...');

then adding a vertex using:

myVertex = g.addVertex(['type':'X', 'Y':Z]);

I can see the db afterwards has a single vertex (using Gephi)
but when I run:

if (g.idx(T.v) != null )

it always returns false.
Should the indexing be turned on somehow?
Does Gremlin require a specific Neo4j version?

Adding some log info:

...
==>v[22092]
==>v[22093]
==>v[22094]
==>v[22095]
gremlin> g.idx(T.v)
==>null
gremlin> g.idx("vertices")
==>null
gremlin> g.indices
gremlin>

Tried this on Gremlin 1.3 – same results. So I guess it is something I am missing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T14:52:56+00:00Added an answer on May 28, 2026 at 2:52 pm

    I think creating indices in Neo4j with Gremlin might be broken. Evidence includes issues raised against neo4j, blueprints and the REST plugin. Even if that’s not the case, Gremlin doesn’t really have first-class access to indices in Neo4j- eg, it can’t create full-text indices last time I checked. Not sure if it can even create relationship indices in Neo.

    I use a Gremlin/Groovy snippet found in the Neo4j docs

    neo4j = g.getRawGraph()
    idxManager = neo4j.index()
    personIndex = idxManager.forNodes('vertices')
    

    I realize this breaks the nice abstraction layer that is Gremlin, but afterwards you can go about your day using Gremlin methods like g.idx('vertices').

    EDIT:

    To get to the index before an index change is “visible” to Gremlin, try this:

    import com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jIndex;
    ind = new Neo4jIndex('vertices', Vertex.class, g)
    

    The advantage this has over the gist I linked in the comments is that ind is a Gremlin index, and can half the usual Gremlin treatment applied. OTOH, the gist in the comments has full access to the raw index.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Opening a public page from browser works fine. Downloading same page using WebClient throws
I'm tracking down a Memory leak within an MDI application. Opening, and then closing
On opening a new terminal window (Mac OSX 10.7.2) and entering rails , I
I'm writing some integration tests using a robot. I have the robot opening a
After opening an XMPP Chat using the Smack library, is it necessary (or even
While opening a file in C# using stream reader is the file going to
I am opening VS2010 solutions using C# and VS2010 automation. I open the solutions
After opening a new tab on my site, I want to move the focus
Im opening a form via ajax (using jquery) and i want to save it
Possible Duplicate: Opening url in new tab while i am doing window.open(), my page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.