Skip to content
Snippets Groups Projects
Commit 64f5e663 authored by Rémy Coutable's avatar Rémy Coutable
Browse files

Fix an issue with wiki in search results when using ES

parent fd82245b
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -880,6 +880,8 @@ def parse_search_result(result)
def parse_search_result_from_elastic(result)
ref = result["_source"]["blob"]["commit_sha"]
filename = result["_source"]["blob"]["path"]
extname = File.extname(filename)
basename = filename.sub(/#{extname}$/, '')
content = result["_source"]["blob"]["content"]
total_lines = content.lines.size
 
Loading
Loading
@@ -909,6 +911,7 @@ def parse_search_result_from_elastic(result)
 
OpenStruct.new(
filename: filename,
basename: basename,
ref: ref,
startline: from + 1,
data: data.join
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment