fixed 项目搜索先es search 中文
This commit is contained in:
parent
c7a6d78c15
commit
63ea4808c9
|
@ -7,7 +7,7 @@ class Projects::ElasticsearchService < ApplicationService
|
||||||
|
|
||||||
def call
|
def call
|
||||||
domain = EduSetting.get("search_api_url") || "https://statistics.gitlink.org.cn"
|
domain = EduSetting.get("search_api_url") || "https://statistics.gitlink.org.cn"
|
||||||
api_url = "#{domain}/search?page=1&size=1000&term=#{@keyword}&type=1"
|
api_url = URI.encode("#{domain}/search?page=1&size=1000&term=#{@keyword}&type=1")
|
||||||
response = Faraday.get(api_url)
|
response = Faraday.get(api_url)
|
||||||
result = JSON.parse(response&.body)
|
result = JSON.parse(response&.body)
|
||||||
project_ids = result['data']['rows'].map{|d|d['instanceId']}
|
project_ids = result['data']['rows'].map{|d|d['instanceId']}
|
||||||
|
|
Loading…
Reference in New Issue