Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


test_query_index failure #34

doismellburning opened this Issue · 3 comments

2 participants


I've just cloned HEAD of master (819531d) and run the tests; I get the below failure

FAIL: test_query_index (__main__.Neo4jPythonClientTestCase)
Traceback (most recent call last):
  File "neo4jrestclient/", line 321, in test_query_index
    self.assertTrue(n1 in results and n2 in results)
AssertionError: False is not True


and in fact, all of the below fails:

    def test_query_index(self):
        n1 = self.gdb.nodes.create(name="John Doe", place="Texas")
        n2 = self.gdb.nodes.create(name="Michael Donald", place="Tijuana")
        index = self.gdb.nodes.indexes.create(name="do", type="fulltext")
        index["surnames"]["doe"] = n1
        index["surnames"]["donald"] = n2
        index['place']['Texas'] = n1
        index['place']['Tijuana'] = n2
        results = index.query("surnames", "do*")
        self.assertTrue(n1 in results and n2 in results)
        results = index.query("surnames:do*")
        self.assertTrue(n1 in results and n2 in results)

        #### All subsequent assertions fail

        results = index.query('surnames', Q('do*'))
        self.assertTrue(n1 in results and n2 in results)
        results = index.query(Q('surnames', 'do*'))
        self.assertTrue(n1 in results and n2 in results)
        results = index.query(Q('surnames', 'do*') & Q('place', 'Tijuana'))
        self.assertTrue(n1 not in results and n2 in results)
        results = index.query(-Q('surnames', 'donald') | +Q('place', 'Texas'))
        self.assertTrue(n2 not in results and n1 in results)

I'm assuming it has something to do with the use of Q (imported as below):

from lucenequerybuilder import Q

I note that requirements.text specifies lucene-querybuilder==0.1.2 where the .egg file for what I have installed specifies >=0.1.2 (I have 0.1.4 installed)

I suspect that lucene-querybuilder is where the issue lies, but file this request for reference / in case someone else can help or find the answer faster than me, or tell me I'm doing something wrong



Thank you for reporting. As you say, the requirements,txt file specifies the lucene-querybuilder version 1.2, because I have not tested yet the a new version. But thank you again for discovering me this, so I'm going to open an issue in the lucene-querybuilder project right now.


@versae versae closed this

Right, well, has >=0.1.2 so I guess that's not desired (

Sorry, I'd fix this myself and send a pull request (admittedly the change is trivial) but I'm having problems setting up an env with 0.1.2 on this machine so can't actually verify anything.


@versae versae reopened this

You are totally right.

@versae versae was assigned
@versae versae closed this in 5e6eabe
@mhluongo mhluongo referenced this issue from a commit in mhluongo/neo4j-rest-client
@mhluongo mhluongo Fixed the test issue found in #34, and updated the REST client to usi…
…ng lucene-querybuilder 0.1.5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.