Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file already closed error when calling /api/<index>/_doc endpoint #923

Open
vbandaru opened this issue Aug 25, 2023 · 0 comments
Open

file already closed error when calling /api/<index>/_doc endpoint #923

vbandaru opened this issue Aug 25, 2023 · 0 comments

Comments

@vbandaru
Copy link

vbandaru commented Aug 25, 2023

Note: Any issue that does not follow below template will be closed without consideration. You may remove this line when filing issue.

What were you trying to achieve?
I have 3 issues 1) Indexing 1M+ docs gives below error 2) how to do fuzzy search from UI. I am trying to search for "earning", I would like to match it to "Earnings" (note capitalization, plural) and have it highlighted 3)any way to search for synonyms for eg: keyword: increase should also match 'rise' (I can supply pre-defined vocabulary as needed)

What action did you take?
Call index endpoint using python

    headers = {"Content-type": "application/json", "Authorization": "Basic " + bas64encoded_creds}
    index = "stockbuddy"
    zinc_host = "http://dell.local:4080"
    zinc_url = zinc_host + "/api/" + index + "/_doc"
    
    for doc in tqdm(docs):
        res = requests.put(zinc_url, headers=headers, data=json.dumps(doc))
        print(res.text)

sample doc:
docs = [{"symbol": "A", "story": "Agilent (A) Down 2.2% Since Last Earnings Report: Can It Rebound?", "source": "Zacks", "story_datetime": "2023-06-22T11:30:00"}]

What action/response/output did you expect?

What actually happened?
rest API returns above returns error
2023-08-25 00:16:08 INFO {"error":"sync /data/stockbuddy/21cIB0oMIp2/wal/00000000000000005245: file already closed"}

docker logs show:
{"level":"error","error":"sync /data/stockbuddy/21cIB0oMJt6/wal/00000000000000005198: file already closed","index":"stockbuddy","shard":"21cIB0oMJt6","time":"2023-08-25T04:25:29Z","message":"consume wal.Sync()"}

How to reproduce the issue?
loop over large collection of docs and call indexing endpoint.

What version of ZincSearch are you using?
public.ecr.aws/zinclabs/zincsearch:latest

Anything else that you can tell that will help us diagnose and resolve the issue efficiently?

Any attachments/screenshots?

Which service(s) is this relate to?
This could be GUI or API
API, Docker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant