Skip to content

Commit

Permalink
Removing some comments from vespa_client.py
Browse files Browse the repository at this point in the history
  • Loading branch information
adityabharadwaj198 committed Jan 31, 2025
1 parent 3c01ff1 commit b8fd8e7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/marqo/vespa/vespa_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -837,14 +837,8 @@ async def _update_document_async(self, semaphore: asyncio.Semaphore, async_clien
end_point = f'{self.document_url}/document/v1/{schema}/{schema}/docid/{doc_id}?create=false'
data["condition"] = f'{schema}.{vespa_id_field}==\"{doc_id}\"'
for key, value in types.items():
# if value == 'int' or value == 'float':
# data["condition"] += f' and ({schema}.marqo__field_types{{\"{key}\"}}=="int" or {schema}.marqo__field_types{{\"{key}\"}}=="float")'
# elif value == 'int_map' or value == 'float_map':
# data["condition"] += f' and ({schema}.marqo__field_types{{\"{key}\"}}=="int_map" or {schema}.marqo__field_types{{\"{key}\"}}=="float_map")'
# else:
data["condition"] += (f' and (not {schema}.marqo__field_types{{\"{key}\"}} or {schema}.marqo__field_types{{\"{key}\"}}==\"{value}\")'
f' and (not ({schema}.marqo__field_types{{\"{key}\"}}=="tensor"))')
# data["condition"].extend(f'{schema}.marqo__field_types.{key}==\"{value}\"'
data["condition"] += (f' and (not {schema}.marqo__field_types{{\"{key}\"}} or {schema}.marqo__field_types{{\"{key}\"}}==\"{value}\")'
f' and (not ({schema}.marqo__field_types{{\"{key}\"}}=="tensor"))')
try:
resp = await async_client.put(end_point, json=data, timeout=timeout)
except httpx.RequestError as e:
Expand Down

0 comments on commit b8fd8e7

Please sign in to comment.