Skip to content

Commit

Permalink
tidy names
Browse files Browse the repository at this point in the history
  • Loading branch information
aaxelb committed Jan 23, 2025
1 parent 332434a commit 9a6c904
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions api/search/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ def _handle_request(self, request):
if 'scroll' in queryparams:
return http.HttpResponseForbidden(reason='Scroll is not supported.')
try:
specific_index = index_strategy.get_strategy_for_sharev2_search(requested_index_strategy)
_index_strategy = index_strategy.get_strategy_for_sharev2_search(requested_index_strategy)
except exceptions.IndexStrategyError as error:
raise http.Http404(str(error))
try:
response_json = specific_index.pls_handle_search__passthru(
response_json = _index_strategy.pls_handle_search__passthru(
request_body=request.data,
request_queryparams=queryparams,
)
Expand Down
4 changes: 2 additions & 2 deletions share/search/index_strategy/trove_indexcard_flats.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def _make_actionset(indexcard_id, *actions):

def pls_handle_search__passthru(self, request_body=None, request_queryparams=None) -> dict:
return self.es8_client.search(
index=self.get_index('').full_index_name,
index=self.__index.full_index_name,
body={
**(request_body or {}),
'track_total_hits': True,
Expand Down Expand Up @@ -356,7 +356,7 @@ def pls_handle_valuesearch(self, valuesearch_params: ValuesearchParams) -> Value
logger.info(json.dumps(_search_kwargs, indent=2))
try:
_es8_response = self.es8_client.search(
index=self.get_index('').full_index_name,
index=self.__index.full_index_name,
**_search_kwargs,
)
except elasticsearch8.TransportError as error:
Expand Down

0 comments on commit 9a6c904

Please sign in to comment.