mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Improved search query
This commit is contained in:
parent
da804e26ae
commit
cbbd33301f
@ -4,8 +4,12 @@ type Query {
|
|||||||
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
|
YIELD node as post, score
|
||||||
RETURN node
|
MATCH (post)<-[:WROTE]-(user:User)
|
||||||
|
WHERE score >= 0.2
|
||||||
|
AND NOT user.deleted = true AND NOT user.disabled = true
|
||||||
|
AND NOT post.deleted = true AND NOT post.disabled = true
|
||||||
|
RETURN post
|
||||||
LIMIT $limit
|
LIMIT $limit
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user