Skip to content

Commit

Permalink
a debug option
Browse files Browse the repository at this point in the history
  • Loading branch information
Paige Gulley committed Aug 26, 2024
1 parent 713adb0 commit effbdfb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class ClientConfig(BaseSettings):
maxpage: int = 1000
elasticsearch_index_name_prefix: str = ""
esopts: Dict = {"request_timeout": 3600, "max_retries": 3}
debug: bool = False


client_config = ClientConfig()
Expand Down Expand Up @@ -59,6 +60,8 @@ def __init__(self, query_text):
"original_url",
]
self._expanded_source = self._source + ["text_content", "text_extraction"]
if client_config.debug:
logger.info(f"Building es query for {self.query_text}")

def _validate_sort_order(self, sort_order: Optional[str]):
if sort_order and sort_order not in self.VALID_SORT_ORDERS:
Expand Down

0 comments on commit effbdfb

Please sign in to comment.