Error creating Neo4j composite index - neo4j

I am trying to create a composite index as documented in http://neo4j.com/docs/developer-manual/current/cypher/schema/index/#create-a-composite-index
This is what I tried.
CREATE INDEX ON :Person(firstname, surname)
however I get the error
Invalid input ',': expected an identifier character, whitespace or ')' (line 1, column 34 (offset: 33))
"CREATE INDEX ON :Person(firstname, surname)"
Can anyone help?

Composite indexes are only available in Neo4j 3.2 which has been released a couple of days ago, make sure you run this version.

Related

Cypher: Indexing returnInvalid input 'i': expected whitespace comment, ON, '=', node labels

This is what I am doing. I really don't know what I am doing wrong
CREATE INDEX index_user FOR (n:User) ON (n.id, n.username, n.email)
The Output is
Invalid input 'i': expected whitespace, comment, ON, '=', node labels,
MapLiteral, a parameter, a parameter (old syntax), a relationship
pattern, ',', FROM GRAPH, CONSTRUCT, LOAD CSV, START, MATCH, UNWIND,
MERGE, CREATE UNIQUE, CREATE, SET, DELETE, REMOVE, FOREACH, WITH,
CALL, RETURN, UNION, ';' or end of input (line 1, column 14 (offset:
13)) "CREATE INDEX index_user FOR (n:User)"
The syntax you are using was added to neo4j 4.x. It is not supported in older versions of neo4j.
In older versions that support composite indexes, like neo4j 3.5, the syntax for creating your index would be:
CREATE INDEX ON :User(id, username, email)
Note: This older syntax is currently still supported in version 4.0.4, but deprecated.

How to encode # in Azure Logic Apps OData Orderby Query?

I have an Excel Online (Business) spreadsheet with a 'Box #' column. I am using the Excel "List rows present in a table" connector and I would like to order by the "Box #" column.
However, when I try to enter it, I either get a syntax error or a column not found error.
"Box #": Syntax error '#' not allowed at this position.
"Box_x0020_#": Syntax error '#' not allowed at this position.
"Box_x0020__x0025_": Column not found.
"Box x0025": "Syntax error at position 11 in 'Box x0023"
Does anyone know how to properly encode the '#' character for use in an OrderBy clause of a SharePoint Logic App Connector? Or better yet, the missing online reference.
try x0023 instead of x0025
x0025 is % according to
https://abstractspaces.wordpress.com/2008/05/07/sharepoint-column-names-internal-name-mappings-for-non-alphabet/

Error when Executing GraphQL query in Neo4J

I've quite a bit of exerience with Neo4J but a noob with graphql
I created my graphql schema by running:
CALL graphql.idl(null)
I have a node type with three labels. I tried to run the following query in graphiql and got the same error. Due to the stack, I wondered if graphiql was adding meta and moved to the neo4j browser - same error.
The query:
CALL graphql.execute('mutation { createArrival(uuid:"graphql")}')
The error:
Failed to invoke procedure `graphql.execute`: Caused by: java.lang.RuntimeException: Error executing GraphQL Query:
ExceptionWhileDataFetching{path=[createArrival]exception=org.neo4j.graphdb.QueryExecutionException: Invalid input 'n': expected whitespace, comment, '{', node labels, MapLiteral, a parameter, a relationship pattern, '(', '.', '=' or "+=" (line 1, column 69 (offset: 68))
"CREATE (node:Arrival) SET node = {properties} SET node:`Event`, SET node:`Configuration`"
^locations=[SourceLocation{line=1, column=12}]}
I'm probably doing something really obviously wrong but any help would be appreciated
Confirmed as a bug by #michael-hunger

Drop index with on nested property (with a dot) in Neo4j

I'm using Neo4j with Bolt and the Neo4j driver in Java. When I tried to run
the following command:
DROP INDEX ON :SingleBoardComputer(id.id)
Note that the name of the property is actually "id.id" (basically with a dot).
I have the following error:
Neo.ClientError.Statement.SyntaxError: Invalid input '\': expected whitespace or a list of property key names (line 1, column 36 (offset: 35))
"DROP INDEX ON :SingleBoardComputer(id.id)"
Is there any way to drop an index using the driver?
I'm using Neo4j 3.3.5 and the neo4j driver 1.6.1
I'm surprised because I can create the index without problems.
Thanks
The solution is to escape the field:
DROP INDEX ON :SingleBoardComputer(`id.id`)

In Neo4j 2.0, can numbers be labels?

I read in the documentation that labels can be string or numbers. However, using only numbers gives an error:
start u=node(5) set u:1234 return labels(u);
The error is:
Invalid input '1': expected whitespace or an identifier (line 1, column 23)
Any non-empty unicode string can be used as a label name. In Cypher, you may need to use the backtick (`) syntax to avoid clashes with Cypher identifier rules.
Here is the source of that: source
I think you are running into a Cypher conflict. If you do this it should work:
start u=node(5)
set u:`1234`
return labels(u);
I was facing the same problem and finally i found the solution
use grave accent(`)
use insert your number inside it

Resources