I am trying to do a Cypher query that uses the advanced Lucene interface to find entries that include spaces. However, I cannot see how to quote this so that it works correctly.
For example purposes, I have a collection of nodes where each node is a book and the title of the book is stored in an index called BookIndex. I want to lookup by parts of the index (e.g. if I have "On the origin of species" I want to be able to find it with "origin of species").
Without spaces in the query, it works fine
START x=node:BookIndex("BookIndex:*origin*")
RETURN x
If I put spaces in the query, I get a null pointer exception - presumably because Leucene is trying to query for "Bookindex:*origin" and seeing "of" and "species" as extra parameters.
START x=node:BookIndex("BookIndex:*origin of species*")
RETURN x
I have tried various combinations of single and double quotes, backticks, and escaping without any joy. It seems the the problem is that both Leucene and Cypher use only double quotes to delimit strings, and Cypher can't escape them (yet). Backticks (`) can be used for properties in Cypher, but not for function parameters.
For the moment, I am replacing spaces with underscores in all indexed fields but it would be nice if this was not needed.
Using neo4 v1.6 from Python v2.7.2 on 64-Bit Xubuntu.