Revert @roschaefer's hacky fix to Search.feature

- now that we are checking to see if there are any badIds, it was breaking the search functionality
This commit is contained in:
Matt Rider 2019-08-26 21:37:36 +02:00
parent b990a1055b
commit 6de602fd58
3 changed files with 6 additions and 6 deletions

View File

@ -35,7 +35,7 @@ export default {
}, },
findPosts: async (object, params, context, resolveInfo) => { findPosts: async (object, params, context, resolveInfo) => {
params = await filterForBlockedUsers(params, context) params = await filterForBlockedUsers(params, context)
return neo4jgraphql(object, params, context, resolveInfo, true) return neo4jgraphql(object, params, context, resolveInfo, false)
}, },
PostsEmotionsCountByEmotion: async (object, params, context, resolveInfo) => { PostsEmotionsCountByEmotion: async (object, params, context, resolveInfo) => {
const session = context.driver.session() const session = context.driver.session()

View File

@ -4,10 +4,10 @@ type Query {
currentUser: User currentUser: User
# Get the latest Network Statistics # Get the latest Network Statistics
statistics: Statistics! statistics: Statistics!
findPosts(query: String!, limit: Int = 10): [Post]! findPosts(filter: String!, limit: Int = 10): [Post]!
@cypher( @cypher(
statement: """ statement: """
CALL db.index.fulltext.queryNodes('full_text_search', $query) CALL db.index.fulltext.queryNodes('full_text_search', $filter)
YIELD node as post, score YIELD node as post, score
MATCH (post)<-[:WROTE]-(user:User) MATCH (post)<-[:WROTE]-(user:User)
WHERE score >= 0.2 WHERE score >= 0.2

View File

@ -46,8 +46,8 @@ export const actions = {
await this.app.apolloProvider.defaultClient await this.app.apolloProvider.defaultClient
.query({ .query({
query: gql` query: gql`
query findPosts($query: String!) { query findPosts($filter: String!) {
findPosts(query: $query, limit: 10) { findPosts(filter: $filter, limit: 10) {
id id
slug slug
label: title label: title
@ -63,7 +63,7 @@ export const actions = {
} }
`, `,
variables: { variables: {
query: value.replace(/\s/g, '~ ') + '~', filter: value.replace(/\s/g, '~ ') + '~',
}, },
}) })
.then(res => { .then(res => {