Project

General

Profile

« Previous | Next » 

Revision 50946

updated the number of results

View differences:

modules/dli-api/trunk/swagger_server/controllers/scholix.py
67 67

  
68 68
def create_response(response, current_page):
69 69
    result = {'totalLinks': response.hits.total, 'currentPage': current_page,
70
              'totalPages': 1 + response.hits.total / 10, 'result': []}
70
              'totalPages': 1 + response.hits.total / 100, 'result': []}
71 71
    now = datetime.now()
72 72
    for item in response.hits:
73 73
        current_item = {'LinkPublicationDate': now.strftime("%Y-%m-%d"), 'HarvestedDate': now.strftime("%Y-%m-%d"),
modules/dli-api/trunk/swagger_server/eu/dnetlib/DLIESConnector.py
114 114

  
115 115
        if len(filters):
116 116
            search_object = search_object.filter(Q('bool', must=filters))
117
        return self.convertScholix(search_object[page:page + 10].execute())
117
        return self.convertScholix(search_object[page:page + 100].execute())
118 118

  
119 119
    def realtionToTypology(self, typology, page=0):
120 120
        search_object = Search(using=self.client, index=self.index_name).doc_type('scholix').query(
121 121
            self.create_typology_query(typology))
122
        return self.convertScholix(search_object[page:page + 10].execute())
122
        return self.convertScholix(search_object[page:page + 100].execute())
123 123

  
124 124
    def realtionFromDatasource(self, datasource, page=0):
125 125
        search_object = Search(using=self.client, index=self.index_name).doc_type('scholix').query(
126 126
            self.create_dataSource_query(datasource))
127
        return self.convertScholix(search_object[page:page + 10].execute())
127
        return self.convertScholix(search_object[page:page + 100].execute())
128 128

  
129 129
    def realtionFromPublisher(self, publisher, page=0):
130 130
        search_object = Search(using=self.client, index=self.index_name).doc_type('scholix').query(
131 131
            self.create_publisher_query(publisher))
132
        return self.convertScholix(search_object[page:page + 10].execute())
132
        return self.convertScholix(search_object[page:page + 100].execute())
modules/dli-api/trunk/swagger_server/eu/dnetlib/v2/DLIESConnector.py
73 73
                                                                              path=start + '.publisher').bucket(
74 74
            'all_pubs', 'terms',
75 75
            field=start + '.publisher.name',
76
            size=10000)
76
            size=1000000)
77 77

  
78 78
        response = search_object.execute()
79 79
        if pub_name:
......
109 109
                q = q & item
110 110
        search_object = Search(using=self.client, index=self.index_name).doc_type('scholix').query(q)
111 111

  
112
        return search_object[page:page + 10].execute()
112
        return search_object[page:page + 100].execute()
113 113

  
114 114

  
115 115
    def realtionToPid(self, pid, pidType=None, datasource=None, typology=None, page=0):
......
126 126

  
127 127
        if len(filters):
128 128
            search_object = search_object.filter(Q('bool', must=filters))
129
        return search_object[page:page + 10].execute()
129
        return search_object[page:page + 100].execute()
130 130

  
131 131
    def realtionToTypology(self, typology, page=0):
132 132
        search_object = Search(using=self.client, index=self.index_name).doc_type('scholix').query(
133 133
            self.create_typology_query(typology))
134
        return search_object[page:page + 10].execute()
134
        return search_object[page:page + 100].execute()
135 135

  
136 136

  
137 137
dli_index = DLIESConnector()

Also available in: Unified diff