Commit 33976c01 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Added more debug logging to search.

parent f5ab2a55
Pipeline #53026 failed with stages
in 17 minutes and 8 seconds
......@@ -26,6 +26,9 @@ from datetime import datetime
from nomad import config, datamodel, infrastructure, datamodel, coe_repo, utils
logger = utils.get_logger(__name__)
path_analyzer = analyzer(
'path_analyzer',
tokenizer=tokenizer('path_tokenizer', 'pattern', pattern='/'))
......@@ -281,9 +284,9 @@ def _execute_paginated_search(
search = search.sort('-%s' % order_by_quantity.elastic_field)
paginated_search = search[(page - 1) * per_page: page * per_page]
print(paginated_search.to_dict())
logger.debug('search request', search_request=str(paginated_search.to_dict()))
response = paginated_search.execute() # pylint: disable=E1101
print(response.to_dict())
logger.debug('search response', search_request=str(paginated_search.to_dict()))
total_results = response.hits.total
search_results = [hit.to_dict() for hit in response.hits]
......
......@@ -750,11 +750,11 @@ class TestRepo():
(0, 'system', 'atom'),
(1, 'atoms', 'Br'),
(1, 'atoms', 'Fe'),
(0, 'atoms', ['Fe', 'Br']), #1
(0, 'atoms', ['Fe', 'Br']),
(0, 'only_atoms', ['Br', 'Si']),
(1, 'only_atoms', ['Fe']),
(1, 'only_atoms', ['Br', 'K', 'Si']), #0
(1, 'only_atoms', ['Br', 'Si', 'K']), #0
(1, 'only_atoms', ['Br', 'K', 'Si']),
(1, 'only_atoms', ['Br', 'Si', 'K']),
(1, 'comment', 'specific'),
(1, 'authors', 'Hofstadter, Leonard'),
(2, 'files', 'test/mainfile.txt'),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment