From 5123768bfbfd09ebf21ab5cec7674a2590d457cc Mon Sep 17 00:00:00 2001
From: blavenie <benoit.lavenier@e-is.pro>
Date: Thu, 14 Mar 2019 11:08:13 +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 | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

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