Fix search

This commit is contained in:
Grzegorz Leoniec 2019-02-17 17:32:14 +01:00 committed by Matt Rider
parent e7c01d8877
commit 360acdb141

View File

@ -3,10 +3,9 @@ type Query {
statistics: Statistics! statistics: Statistics!
findPosts(filter: String!, limit: Int = 10): [Post]! @cypher( findPosts(filter: String!, limit: Int = 10): [Post]! @cypher(
statement: """ statement: """
CALL db.index.fulltext.queryNodes('full_text_search', $filter+'~') CALL db.index.fulltext.queryNodes('full_text_search', $filter)
YIELD node AS node YIELD node
RETURN node RETURN node
ORDER BY node.createdAt DESC
LIMIT $limit LIMIT $limit
""" """
) )