From 0392ffb9e018c46759b7d7b38f1ce6d8bd02a1fb Mon Sep 17 00:00:00 2001
From: blavenie <benoit.lavenier@e-is.pro>
Date: Thu, 14 Mar 2019 11:10:36 +0100
Subject: [PATCH] [fix] Cs+ Wot: Allow to find a Cs+ profile, event if Duniter
 node not return the pubkey - fix #804

---
 www/plugins/es/js/services/profile-services.js | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/www/plugins/es/js/services/profile-services.js b/www/plugins/es/js/services/profile-services.js
index 6fa023b9..a2d831aa 100644
--- a/www/plugins/es/js/services/profile-services.js
+++ b/www/plugins/es/js/services/profile-services.js
@@ -192,18 +192,16 @@ angular.module('cesium.es.profile.services', ['cesium.services', 'cesium.es.http
           };
         }
         else {
-          request.query.constant_score = {
-            filter: {bool: {
-                should: [
-                  {terms : {"_id^4" : pubkeys}},
-                  {match: {title: {query: text, boost: 2}}},
-                  {prefix: {title: text}}
-                ]}
-            }
+          request.query.bool = {
+            should: [
+              {terms : {"_id^4" : pubkeys}},
+              {match: {title: {query: text, boost: 2}}},
+              {prefix: {title: text}}
+            ]
           };
 
           if (tags) {
-            request.query.constant_score.filter.bool.should.push({terms: {tags: tags}});
+            request.query.bool.should.push({terms: {tags: tags}});
           }
         }
       }
-- 
GitLab