Revision 40969
Added by Sandro La Bruzzo almost 9 years ago
DLIQueryResolver.py | ||
---|---|---|
12 | 12 |
self.solr_server = pysolr.Solr(self.solr_url) |
13 | 13 |
self.base_url_dnet = base_url_dnet |
14 | 14 |
self.facet_renaming = {'entitytype': "Typology", 'provenance': "Content Provider", |
15 |
"Content Provider": 'provenance', "Typology": 'entitytype'} |
|
15 |
"Content Provider": 'provenance', "Typology": 'entitytype', |
|
16 |
"publisher":"publisher"} |
|
16 | 17 |
|
17 | 18 |
def get_facet(self, facet, query=None): |
18 | 19 |
data = [] |
... | ... | |
29 | 30 |
data.append({'facet': self.facet_renaming[f], 'query_name': f, |
30 | 31 |
'values': [{'key': facet[f][i], 'value': facet[f][i + 1]} for i in range(0, len(facet[f]), 2)]}) |
31 | 32 |
|
33 |
f = 'publisher' |
|
34 |
data.append({'facet': self.facet_renaming[f], 'query_name': f, |
|
35 |
'values': [{'key': facet[f][i], 'value': facet[f][i + 1]} for i in range(0, len(facet[f]), 2)]}) |
|
36 |
|
|
32 | 37 |
return data |
33 | 38 |
|
34 | 39 |
def get_item(self, persistent_identifier): |
Also available in: Unified diff
implemented publisher feature on DLI