mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
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:
parent
b990a1055b
commit
6de602fd58
@ -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()
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user