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) => {
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) => {
const session = context.driver.session()

View File

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

View File

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