Added NSFW filter to query #122
No reviewers
Labels
No labels
area: app c
area: app d
area: devops
area: discovery
area: docs
area: proposal
area: X-device Sync
Chainquery
consider soon
dependencies
Epic
Fix till next release
good first issue
hacktoberfest
help wanted
icebox
Invalid
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
Parked
priority: blocker
priority: high
priority: low
priority: medium
Tom's Wishlist
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lighthouse.js#122
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "nsfw_filter"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Nsfw parameter added to input, for example :
http://127.0.0.1:50005/search?s=lbry&nsfw=true
returns only nsfw results (see issue #110).
Other filters can easily added to the getFilters function.
@ -246,2 +220,4 @@
'value.stream.metadata.title',
'value.stream.metadata.description',
],
},
This worked? I need to double check but I thought it stores the value in elastic search in the same way it is grabbed from Chainquery [0,1]
@ -246,2 +220,4 @@
'value.stream.metadata.title',
'value.stream.metadata.description',
],
},
Do you mean for value.stream.metadata.nsfw ? There is no nsfw field at the top level like for "channel", it's inside the value object.
@ -246,2 +220,4 @@
'value.stream.metadata.title',
'value.stream.metadata.description',
],
},
yeah, you are comparing
value.stream.metadata.nsfw
toinput.nsfw
. I was just saying that I thought one is a number and one is string. I am not too great with javascript. Maybe[0,1]
is mapped totrue/false
automatically. I just need to load up the branch locally to validate. I will do this soon. Thanks for the PR!@ -246,2 +220,4 @@
'value.stream.metadata.title',
'value.stream.metadata.description',
],
},
It's stored as true/false in Elasticsearch https://www.elastic.co/guide/en/elasticsearch/reference/current/boolean.html#boolean
Looks good now
@filipnyquist I reviewed this and tested it locally. All is well. If you have any comments, please note them, otherwise I will merge and deploy this early in the week.
Thanks for adding the docs !
@marcdeb1, please shoot us an email to hello@lbry.io with a time estimate for this one too :)
Thanks for the PR!