Skip to content
Snippets Groups Projects
Commit 010b118a authored by Marcela Ribeiro de Oliveira's avatar Marcela Ribeiro de Oliveira
Browse files

Merge branch 'list' into 'master'

List - elasticsearch search

See merge request !421
parents 99536400 c9e426bd
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,9 @@ module SearchService
},
filter: mount_filter
}
}
},
size: @search.results_per_page,
from: ((@search.page.to_i) * (@search.results_per_page.to_i)).to_s
}
return match_all_query if @search.query == '*'
......@@ -58,7 +60,11 @@ module SearchService
} },
functions: [{ script_score: { script: { lang: 'groovy', file: 'calculate_score' } } }]
}
}
},
# https://www.elastic.co/guide/en/elasticsearch/guide/current/pagination.html
# Comeca pagina 0
size: @search.results_per_page,
from: ((@search.page.to_i) * (@search.results_per_page.to_i)).to_s
}
end
......
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