neo4j-graphql / neo4j-graphql-js

NOTE: This project is no longer actively maintained. Please consider using the official Neo4j GraphQL Library (linked in README).
Other
609 stars 147 forks source link

Failed to invoke function `apoc.cypher.runFirstColumn`: Caused by: java.lang.IllegalArgumentException: There is no such fulltext schema index: #522

Open ben749l opened 4 years ago

ben749l commented 4 years ago

Hello, I'm trying to use full text search functionality but I have an error.

Important details:

Neo4j version: Desktop, 4.1.0 APOC version: 4.1.0.1 Operating system: Windows 10 In Neo4j Desktop, in my db I did this: CALL db.index.fulltext.createNodeIndex("articleIndex", ["ARTICLE"],["title"])

Next, still in Desktop I tried a request and it works: CALL db.index.fulltext.queryNodes("articleIndex", "tiktok")

So I added a cypher directive in my graphql schema:

type Query {
  # fulltext search query
  fuzzyArticleByTitle(searchString: String): [ARTICLE] @cypher(statement:" CALL db.index.fulltext.queryNodes('articleIndex', $searchString+'~') YIELD node, score RETURN node.title, score")
}

I tried a request in GraphQL Playground:

{
  fuzzyArticleByTitle(searchString:"tiktok"){
    title
  }
}

And I have the following error: "message": "Failed to invoke function apoc.cypher.runFirstColumn: Caused by: java.lang.IllegalArgumentException: There is no such fulltext schema index: articleIndex"

I don't how I can fix this bug

michaeldgraham commented 3 years ago

https://github.com/neo4j-graphql/neo4j-graphql-js/issues/608