You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried the new Multi Term Vector query. But when I add a lot of (1000) ids to the Ids parameter. I get an error:
An unhandled exception of type 'Elasticsearch.Net.Exceptions.MaxRetryException' occurred in Elasticsearch.Net.dll
Additional information: Unable to perform request: 'POST ' on any of the nodes after retrying 0 times.
on the Transport.cs - line: 259
The request looks like:
var mtvResul = client.MultiTermVectors(mtv => mtv
.Fields(bd => bd.BlockText)
.Ids(ids.ToArray())
);
Where ids is a List with 1000 elements.
Am I doing somehing wrong?
Thanks!
The text was updated successfully, but these errors were encountered:
I was able to reproduce the same issue. The problem here is that when you use the Ids descriptor method, a query string is generated, and it's too large. You should use the Documents descriptor method instead so that the docs will be added as part of the request body. Something like this:
var mtvResul = client.MultiTermVectors(mtv => mtv
.Fields(bd => bd.BlockText)
.Documents(d => d.Id("1"), d => d.Id("2")));
);
In your case this isn't really ideal because you have an array of ids that you want to add to the request. If #649 is merged, you'll be able to do this instead:
var mtvResul = client.MultiTermVectors(mtv => mtv
.Fields(bd => bd.BlockText)
.Documents(ids.Select(id => new MultiTermVectorDocument { Id = id.ToString() }))
);
Hi!
I tried the new Multi Term Vector query. But when I add a lot of (1000) ids to the Ids parameter. I get an error:
An unhandled exception of type 'Elasticsearch.Net.Exceptions.MaxRetryException' occurred in Elasticsearch.Net.dll
Additional information: Unable to perform request: 'POST ' on any of the nodes after retrying 0 times.
on the Transport.cs - line: 259
The request looks like:
var mtvResul = client.MultiTermVectors(mtv => mtv
.Fields(bd => bd.BlockText)
.Ids(ids.ToArray())
);
Where ids is a List with 1000 elements.
Am I doing somehing wrong?
Thanks!
The text was updated successfully, but these errors were encountered: