Index: modules/dli-service-portal/branches/ES_7/static/partials/detail.html
===================================================================
--- modules/dli-service-portal/branches/ES_7/static/partials/detail.html	(revision 61368)
+++ modules/dli-service-portal/branches/ES_7/static/partials/detail.html	(revision 61369)
@@ -84,7 +84,7 @@
                  <div class="row">
                 <div class="panel panel-primary">
                     <div class="panel-body">
-                        <div ng-repeat="id in item.localIdentifier">{{id.type }}:   <a href="{{ id.url }}">{{ id.id}}</a> </div>
+                        <div ng-repeat="id in item.localIdentifier">{{id.schema }}:   <a href="{{ id.url }}">{{ id.identifier}}</a> </div>
                         <hr>
                         Sources
                         <ul>
Index: modules/dli-service-portal/branches/ES_7/static/angular/queryController.js
===================================================================
--- modules/dli-service-portal/branches/ES_7/static/angular/queryController.js	(revision 61368)
+++ modules/dli-service-portal/branches/ES_7/static/angular/queryController.js	(revision 61369)
@@ -235,6 +235,8 @@
             }
         }).error(function (data) {
 
+            console.log(data)
+            window.alert("ERROR")
         })
 
     }
Index: modules/dli-service-portal/branches/ES_7/eu/dnetlib/es_connector.py
===================================================================
--- modules/dli-service-portal/branches/ES_7/eu/dnetlib/es_connector.py	(revision 61368)
+++ modules/dli-service-portal/branches/ES_7/eu/dnetlib/es_connector.py	(revision 61369)
@@ -10,7 +10,6 @@
 import os
 from os import path
 
-
 log = logging.getLogger("scholexplorer-portal")
 
 pid_resolver = {
@@ -43,7 +42,7 @@
 def resolveIdentifier(pid, pid_type):
     if pid_type != None:
         regex = r"\b(10[.][0-9]{4,}(?:[.][0-9]+)*/(?:(?![\"&\'<>])\S)+)\b"
-        if re.match(regex,pid):
+        if re.match(regex, pid):
             log.debug("It should be doi")
             pid_type = 'doi'
         if pid_type.lower() in pid_resolver:
@@ -52,15 +51,12 @@
             if pid_type.lower() == 'openaire':
                 return "https://www.openaire.eu/search/publication?articleId=%s" % pid.replace('oai:dnet:', '')
             elif pid_type.lower() == 'url':
-                return  pid
+                return pid
             else:
                 return "http://identifiers.org/%s:%s" % (pid_type, pid)
     return ""
 
 
-
-
-
 def create_typology_filter(value):
     return Q('match', typology=value)
 
@@ -106,14 +102,14 @@
         self.index_name = props['api.index']
 
     def get_main_page_stats(self):
-        stats = dict(total =int(Search(using=self.client, index=self.index_name+"_scholix").count()/2))
+        stats = dict(total=int(Search(using=self.client, index=self.index_name + "_scholix").count() / 2))
         for item in ['dataset', 'publication']:
-            s= Search(using=self.client, index=self.index_name+"_object").query(Q('match', typology=item))
+            s = Search(using=self.client, index=self.index_name + "_object").query(Q('match', typology=item))
             stats[item] = s.count()
         return stats
 
     def query_by_id(self, id):
-        s = Search(using=self.client, index=self.index_name+"_object")
+        s = Search(using=self.client, index=self.index_name + "_object")
         s = s.query(create_pid_query(id))
         s.aggs.bucket('typologies', 'terms', field='typology')
         s.aggs.bucket('all_datasources', 'nested', path='datasources').bucket('all_names', 'terms',
@@ -162,8 +158,8 @@
                                         publishers=publishers), hits=hits)
 
     def simple_query(self, textual_query, start=None, end=None, user_filter=None):
-        s = Search(using=self.client, index=self.index_name+"_object")
-        if not textual_query  == '*':
+        s = Search(using=self.client, index=self.index_name + "_object")
+        if not textual_query == '*':
             q = Q("multi_match", query=textual_query, fields=['title', 'abstract'])
         else:
             q = Q()
@@ -200,18 +196,19 @@
             s = s[start:end]
         response = s.execute()
 
-        
-
         hits = []
 
+        print(f"index : {self.index_name}_object")
+        print(response.hits.total)
+
         for index_result in response.hits:
-            input_source = index_result.__dict__['_d_']           
-            fixed_titles = []            
-            for ids in input_source.get('localIdentifier', []):
-                ds = resolveIdentifier(ids['id'], ids['type'])
-                ids['url'] = ds
+            input_source = index_result.__dict__['_d_']
+            fixed_titles = []
+            # for ids in input_source.get('localIdentifier', []):
+            #     ds = resolveIdentifier(ids['id'], ids['type'])
+            #     ids['url'] = ds
 
-            if input_source.get('title', []) is not None:           
+            if input_source.get('title', []) is not None:
                 for t in input_source.get('title', []):
                     if len(t) > 0 and t[0] == '"' and t[-1] == '"':
                         fixed_titles.append(t[1:-1])
@@ -218,10 +215,10 @@
                     else:
                         fixed_titles.append(t)
             else:
-                fixed_titles.append("title not available")            
+                fixed_titles.append("title not available")
             input_source['title'] = fixed_titles
             hits.append(input_source)
-        
+
         pid_types = []
         for tag in response.aggs.all_pids.all_types.buckets:
             pid_types.append(dict(key=tag.key, count=tag.doc_count))
@@ -248,10 +245,10 @@
         query_type = Q('nested', path='target', query=Q('bool', must=[Q('match', **args)]))
         args_id = {'source.dnetIdentifier': object_id}
         query_for_id = Q('nested', path='source', query=Q('bool', must=[Q('match', **args_id)]))
-        s = Search(using=self.client).index(self.index_name+"_scholix").query(query_for_id & query_type)
+        s = Search(using=self.client).index(self.index_name + "_scholix").query(query_for_id & query_type)
         if start:
             s = s[start:start + 10]
-       
+
         response = s.execute()
         hits = []
         for index_hit in response.hits:
@@ -261,7 +258,7 @@
                 for item in current_item['target']['identifier']:
                     c_it = item
                     c_it['url'] = resolveIdentifier(item['identifier'], item['schema'])
-                    ids .append(c_it)
+                    ids.append(c_it)
                 current_item['target']['identifier'] = ids
             hits.append(current_item)
 
@@ -271,7 +268,7 @@
         if relation is None:
             return
         relSource = relation.get('source')
-        collectedFrom = relSource.get('collectedFrom',[])
+        collectedFrom = relSource.get('collectedFrom', [])
         if collectedFrom is not None:
             for coll in collectedFrom:
                 for d in source['datasources']:
@@ -281,11 +278,11 @@
 
     def item_by_id(self, id, type=None, start=None):
         try:
-            res = self.client.get(index=self.index_name+"_object",doc_type="_all", id=id, _source=True)
+            res = self.client.get(index=self.index_name + "_object", doc_type="_all", id=id, _source=True)
             hits = []
             input_source = res['_source']
             fixed_titles = []
-            for t in input_source.get('title',[]):
+            for t in input_source.get('title', []):
                 if len(t) > 0 and t[0] == '"' and t[-1] == '"':
                     fixed_titles.append(t[1:-1])
                 else:
@@ -292,12 +289,9 @@
                     fixed_titles.append(t)
             input_source['title'] = fixed_titles
 
-            for ids in input_source.get('localIdentifier', []):
-                ds = resolveIdentifier(ids['id'], ids['type'])
-                ids['url'] = ds
             related_publications = []
             related_dataset = []
-            related_unknown = []            
+            related_unknown = []
 
             rel_source = None
             if input_source.get('relatedPublications') > 0:
@@ -310,8 +304,6 @@
                 else:
                     rel_source = {}
 
-
-
             if input_source.get('relatedDatasets') > 0:
                 if 'dataset' == type:
                     related_dataset = self.related_type(id, 'dataset', start)
@@ -332,8 +324,8 @@
                              related_unknown=related_unknown))
 
             return DLIESResponse(total=1, hits=hits)
-        except Exception as e:            
+        except Exception as e:
             log.error("Error on getting item ")
-            log.error(e)            
+            log.error(e)
             log.error("on line %i" % sys.exc_info)
             return DLIESResponse()
Index: modules/dli-service-portal/branches/ES_7/main.py
===================================================================
--- modules/dli-service-portal/branches/ES_7/main.py	(revision 61368)
+++ modules/dli-service-portal/branches/ES_7/main.py	(revision 61369)
@@ -5,7 +5,7 @@
 from starlette.responses import FileResponse
 from eu.dnetlib.es_connector import DLIESConnector
 import sys
-from eu.dnetlib.metrics_utils import metrics 
+from eu.dnetlib.metrics_utils import metrics
 from eu.dnetlib.metricsMiddleware import PrometheusMiddleware
 
 _CURDIR = os.path.dirname(os.path.abspath(__file__))
@@ -41,7 +41,7 @@
 
 log = logging.getLogger("scholexplorer-portal")
 log.setLevel(logging.INFO)
-fh = logging.StreamHandler(sys.stdout) 
+fh = logging.StreamHandler(sys.stdout)
 fh.setLevel(logging.INFO)
 formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
 fh.setFormatter(formatter)
@@ -66,8 +66,8 @@
     return dict(result=connector.get_main_page_stats())
 
 @app.post('/api/queryPid/')
-def query_pid(*, pid:str= Form(...)):       
-    connector = DLIESConnector()    
+def query_pid(*, pid:str= Form(...)):
+    connector = DLIESConnector()
     return dict(result=connector.query_by_id(pid))
 
 
@@ -74,12 +74,14 @@
 
 @app.post('/api/post/')
 def query_post(*, start:int= Form(default=0), action:str=Form(default="query"), query:str=Form(...),filter:str=Form(default=None)):
+    print("SONO QUIIII")
+
     filter_key = None
-    result = {}  
+    result = {}
     if filter:
         filter_key = filter
     if action == 'query' and query is not None:
-        
+        print(f"query is {query}")
         connector = DLIESConnector()
         try:
             result = connector.simple_query(query, start=start, user_filter=filter_key)
@@ -93,7 +95,7 @@
 @app.get('/api/item/{identifier}')
 @app.post('/api/item/{identifier}')
 def get_item(identifier:str, object_type:str=Form(default=None), start:int=Form(default=0)):
-    if identifier:        
+    if identifier:
         connector = DLIESConnector()
         return dict(result=connector.item_by_id(identifier, object_type, start))
     else:
