Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33103012
search.ex
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
729 B
Referenced Files
None
Subscribers
None
search.ex
View Options
defmodule
Pleroma.Search
do
alias
Pleroma.Workers.SearchIndexingWorker
def
add_to_index
(%
Pleroma.Activity
{
id
:
activity_id
})
do
SearchIndexingWorker
.
new
(%{
"op"
=>
"add_to_index"
,
"activity"
=>
activity_id
})
|>
Oban
.
insert
()
end
def
remove_from_index
(%
Pleroma.Object
{
id
:
object_id
})
do
SearchIndexingWorker
.
new
(%{
"op"
=>
"remove_from_index"
,
"object"
=>
object_id
})
|>
Oban
.
insert
()
end
def
search
(
query
,
options
)
do
search_module
=
Pleroma.Config
.
get
([
Pleroma.Search
,
:module
])
search_module
.
search
(
options
[
:for_user
],
query
,
options
)
end
def
healthcheck_endpoints
do
search_module
=
Pleroma.Config
.
get
([
Pleroma.Search
,
:module
])
search_module
.
healthcheck_endpoints
()
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Tue, Jan 20, 1:13 PM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
973033
Default Alt Text
search.ex (729 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment