How to query with doctrine dql the where in clause?

Neo4j: Can Cypher query use index automatic in where clause to filter the result?

  • I found it too slow when using where clause, so suspect it does not use lucene index ,why, I know the start clause can use index ,why where can't?

  • Answer:

    No, not at the moment, though that's been announced as being in the plans. I frequently find that if I feel I need to use indexes as anything other than a place to start pattern matching, though, what I really need to do is rethink my query or graph structure. There's also a possibility your scenario can be handled using additional start clauses, which can each use an index lookup. For instance, if your query returns a a number of nodes that you then narrow down to a smaller number, which you then want to connect to some other nodes: START possible=node:node_auto_index({possibles_query}) WHERE possible-[:won]->() WITH possible START prize=node:node_auto_index({other_query}) CREATE possible-[:owns]->prize Note: that will connect every possible (remaining after the WHERE clause is applied) to every prize.

Russell Duhon at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.