mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2025-02-16 21:38:33 +00:00
Update sonic.py
Sonic buffer accepts 20.000 bytes not unicode characters, since the chunking here is on unicode characters, sending 20.000 characters will overflow sonic's buffer. UTF-8 can take up to 6 bytes, so sending less than (20.000 / 6) rounded minus should be ok.
This commit is contained in:
parent
d8f6d4d517
commit
14df0cbb7c
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@ from sonic import IngestClient, SearchClient
|
||||||
from archivebox.util import enforce_types
|
from archivebox.util import enforce_types
|
||||||
from archivebox.config import SEARCH_BACKEND_HOST_NAME, SEARCH_BACKEND_PORT, SEARCH_BACKEND_PASSWORD, SONIC_BUCKET, SONIC_COLLECTION
|
from archivebox.config import SEARCH_BACKEND_HOST_NAME, SEARCH_BACKEND_PORT, SEARCH_BACKEND_PASSWORD, SONIC_BUCKET, SONIC_COLLECTION
|
||||||
|
|
||||||
MAX_SONIC_TEXT_LENGTH = 20000
|
MAX_SONIC_TEXT_LENGTH = 2000
|
||||||
|
|
||||||
@enforce_types
|
@enforce_types
|
||||||
def index(snapshot_id: str, texts: List[str]):
|
def index(snapshot_id: str, texts: List[str]):
|
||||||
|
|
Loading…
Add table
Reference in a new issue