Closed PSvishnu93 closed 6 years ago
To do sorting I added following lines of code to the app.py `app.config['RECORDS_REST_SORT_OPTIONS'] = { index_name: { 'project_name': dict(fields=['project_name'], title='Project Name', order=1), } }
app.config['RECORDS_REST_DEFAULT_SORT'] = { index_name: { 'query': 'project_name', 'noquery': 'project_name', } }`
When I run the flask app I got the error "TypeError: 'RequestError' object is not callable".
Solution : I made the below changes and code worked perfectly.
'project_name': dict(fields=['project_name.keyword'], title='Project Name', order=1)
To do sorting I added following lines of code to the app.py `app.config['RECORDS_REST_SORT_OPTIONS'] = { index_name: { 'project_name': dict(fields=['project_name'], title='Project Name', order=1), } }
Default sorting.
app.config['RECORDS_REST_DEFAULT_SORT'] = { index_name: { 'query': 'project_name', 'noquery': 'project_name', } }`
When I run the flask app I got the error "TypeError: 'RequestError' object is not callable".