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

søker eksakt og wildcard

parent f7d54c1e
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,7 @@ export default {
var self = this
self.waiting = true
self.article = {lemmas: [], body:{pronunciation: [], definitions: [], etymology: []}}
axios.get(api_endpoint + '/' + self.lang + '/_search?q=' + event.q)
axios.get(api_endpoint + '/' + self.lang + '/_search?q=' + event.q + ' ' + event.q + '*&sort=_score')
.then(function(response){
self.$router.push('/' + self.lang + '/search?q=' + event.q)
self.search_results = response.data.hits.hits
......@@ -125,7 +125,7 @@ export default {
this.lang = this.$route.params.lang || 'nob'
var self = this;
if(this.$route.query.q) {
axios.get(api_endpoint + '/' + self.lang + '/_search?q=' + self.$route.query.q + '&sort=_score')
axios.get(api_endpoint + '/' + self.lang + '/_search?q=' + self.$route.query.q + ' ' + self.$route.query.q + '*&sort=_score')
.then(function(response){
self.search_results = response.data.hits.hits
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