Removed not needed spaces.
This commit is contained in:
parent
c7dae8a456
commit
1be0682457
3 changed files with 10 additions and 10 deletions
|
@ -3,7 +3,7 @@ class ApplicationModel::BackgroundJobSearchIndex
|
||||||
def initialize(object, o_id)
|
def initialize(object, o_id)
|
||||||
@object = object
|
@object = object
|
||||||
@o_id = o_id
|
@o_id = o_id
|
||||||
end
|
end
|
||||||
|
|
||||||
def perform
|
def perform
|
||||||
Object.const_get(@object).find(@o_id).search_index_update_backend
|
Object.const_get(@object).find(@o_id).search_index_update_backend
|
||||||
|
|
|
@ -16,10 +16,10 @@ create/update/delete index
|
||||||
:type => 'nested',
|
:type => 'nested',
|
||||||
:properties => {
|
:properties => {
|
||||||
'attachments' => { :type => 'attachment' }
|
'attachments' => { :type => 'attachment' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -122,7 +122,7 @@ return search result
|
||||||
|
|
||||||
url = build_url()
|
url = build_url()
|
||||||
return if !url
|
return if !url
|
||||||
if index
|
if index
|
||||||
url += "/#{index}/_search"
|
url += "/#{index}/_search"
|
||||||
else
|
else
|
||||||
url += '/_search'
|
url += '/_search'
|
||||||
|
@ -130,7 +130,7 @@ return search result
|
||||||
data = {}
|
data = {}
|
||||||
data['from'] = 0
|
data['from'] = 0
|
||||||
data['size'] = 10
|
data['size'] = 10
|
||||||
data['sort'] =
|
data['sort'] =
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
:updated_at => {
|
:updated_at => {
|
||||||
|
@ -183,7 +183,7 @@ return search result
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
return true if backend is configured
|
return true if backend is configured
|
||||||
|
|
||||||
result = SearchIndexBackend.enabled?
|
result = SearchIndexBackend.enabled?
|
||||||
|
|
||||||
|
|
|
@ -29,10 +29,10 @@ namespace :searchindex do
|
||||||
:attachments => {
|
:attachments => {
|
||||||
:type => 'attachment',
|
:type => 'attachment',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue