Skip to content

Commit

Permalink
fix: card.pk => card.card_pk
Browse files Browse the repository at this point in the history
  • Loading branch information
aaxelb committed Oct 25, 2024
1 parent b315c98 commit ad5a52b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions share/search/index_strategy/trovesearch_denorm.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def before_chunk(self, messages_chunk: messages.MessagesChunk, indexnames: Itera
self.es8_client.delete_by_query(
index=list(indexnames),
query={'bool': {'must': [
{'terms': {'card.pk': messages_chunk.target_ids_chunk}},
{'terms': {'card.card_pk': messages_chunk.target_ids_chunk}},
{'exists': {'field': 'iri_value.value_iri'}},
]}},
)
Expand Down Expand Up @@ -718,7 +718,7 @@ def _randomly_ordered_query(self, _bool: _BoolBuilder) -> dict:
'random_score': {}, # default random_score is fast and unpredictable
},
}
_firstpage_filter = {'terms': {'card.pk': self.cursor.first_page_pks}}
_firstpage_filter = {'terms': {'card.card_pk': self.cursor.first_page_pks}}
if self.cursor.is_first_page():
# returning to a first page previously visited
_bool.add_boolpart('filter', _firstpage_filter)
Expand All @@ -731,7 +731,7 @@ def _randomly_ordered_query(self, _bool: _BoolBuilder) -> dict:
'boost_mode': 'replace',
'random_score': {
'seed': ''.join(self.cursor.first_page_pks),
'field': 'card.pk',
'field': 'card.card_pk',
},
},
}
Expand Down

0 comments on commit ad5a52b

Please sign in to comment.