From 4323b0f65c65a21805669696c8b7c096e1455ade Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ole=20Volds=C3=A6ter?= <ole.voldsater@uib.no>
Date: Fri, 28 Feb 2020 14:14:59 +0100
Subject: [PATCH] =?UTF-8?q?s=C3=B8ker=20eksakt=20og=20wildcard?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/App.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/App.vue b/src/App.vue
index 0fe622af..6398a1bd 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -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
-- 
GitLab