Skip to content
Snippets Groups Projects
Commit 715981f6 authored by Ole Voldsæter's avatar Ole Voldsæter
Browse files

20 treff for "alle søkeresultater"

parent 9a2aeb87
No related branches found
No related tags found
No related merge requests found
...@@ -61,7 +61,8 @@ export default { ...@@ -61,7 +61,8 @@ export default {
"suggest" : { "suggest" : {
"prefix" : q, "prefix" : q,
"completion" : { "completion" : {
"field" : "suggest" "field" : "suggest",
"size": 10
} }
} }
} }
...@@ -93,7 +94,7 @@ export default { ...@@ -93,7 +94,7 @@ export default {
var self = this var self = this
self.waiting = true self.waiting = true
self.article = {lemmas: [], body:{pronunciation: [], definitions: [], etymology: []}} self.article = {lemmas: [], body:{pronunciation: [], definitions: [], etymology: []}}
axios.get(api_endpoint + '/' + self.lang + '/_search?q=' + event.q + ' ' + event.q + '*&sort=_score') axios.get(api_endpoint + '/' + self.lang + '/_search?q=' + event.q + ' ' + event.q + '*&size=20')
.then(function(response){ .then(function(response){
self.$router.push('/' + `/search?q=${event.q}&lang=${self.lang}`) self.$router.push('/' + `/search?q=${event.q}&lang=${self.lang}`)
self.search_results = response.data.hits.hits self.search_results = response.data.hits.hits
...@@ -128,7 +129,7 @@ export default { ...@@ -128,7 +129,7 @@ export default {
this.lang = this.$route.params.lang || this.$route.query.lang || 'nob,nno' this.lang = this.$route.params.lang || this.$route.query.lang || 'nob,nno'
var self = this; var self = this;
if(this.$route.query.q) { if(this.$route.query.q) {
axios.get(api_endpoint + '/' + self.lang + '/_search?q=' + self.$route.query.q + ' ' + self.$route.query.q + '*&sort=_score') axios.get(api_endpoint + '/' + self.lang + '/_search?q=' + self.$route.query.q + ' ' + self.$route.query.q + '*&size=20')
.then(function(response){ .then(function(response){
self.search_results = response.data.hits.hits self.search_results = response.data.hits.hits
self.waiting = false self.waiting = false
......
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