Comments (3)
Hey Dragos,
Do you have a script that reproduces this problem that I could try to run?
On 23 Nov. 2016, at 12:36, Dragos [email protected] wrote:
When I do indexing like this:
ProductDocument.index(product.id, data)
every now and then, I get this error:
** (FunctionClauseError) no function clause matching in Elastic.ResponseHandler.process/1
(elastic) lib/elastic/response_handler.ex:4: Elastic.ResponseHandler.process(%HTTPotion.ErrorResponse{message: "req_timedout"})
(elixir) lib/enum.ex:651: Enum."-each/2-lists^foreach/1-0-"/2
(elixir) lib/enum.ex:651: Enum.each/2
(elixir) lib/code.ex:363: Code.require_file/2
(mix) lib/mix/tasks/run.ex:71: Mix.Tasks.Run.run/1
(mix) lib/mix/task.ex:296: Mix.Task.run_task/3
(mix) lib/mix/cli.ex:58: Mix.CLI.run_task/2
(elixir) lib/code.ex:363: Code.require_file/2
The indexing works( ie the document is indexed and can be search) but the script that does multiple indexing operations breaks after the first operation.It seems that assigning the result to a variable
response = ProductDocument.index(product.id, data)
doesn't break the script after the first indexing operation but I'm not sure if this was the intended behaviour of the package.What would be a better solution( if any)?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
from elastic.
I don't have a script because I ran that line of code in the console, but I've noticed the error happens when I run that instruction shortly after I open iex
.
Also since I've initially opened this issue, I've noticed that this error also appears when I do a bulk create with too many rows( ie Elastic.Bulk.create(indexable_chunk)
). If index_chunk has more that 10_000 tuples in it, I get that error, otherwise, if it's 10_000 or less I get no error and I also don't need to assign the result to any variable.
So now I think the error has more to do with the fact that ES can't handle new requests at a certain point in time, rather that what I said in my previous comment.
from elastic.
Ok, no worries. I don't know of a good way to make Elastic.Bulk.create
complain if you pass it a large amount of chunks... or even if it should complain!
I think the req_timedout
message should be handled better, and so I've made 39c9bc7 for that.
from elastic.
Related Issues (19)
- Possibility of configuring index name at run time?
- Cant get it working. Any idea ??? HOT 1
- Some speed issues HOT 3
- Bump Credo to 0.6.0 + fix warnings HOT 1
- Stop using Mix.env HOT 5
- Elastic.HTTP.post/2 fails with NDJSON body
- illegal_argument_exception when using AWS HOT 6
- Is it possible to connect to more than one cluster? HOT 3
- Scroller GenServer call timeouts HOT 1
- Handle error case for search in Document.API? HOT 2
- 12 factor concerns HOT 4
- Exception is being thrown when HTTPotion not able to resolve base_url
- Nested structs and the Document API HOT 1
- Typespecs? HOT 1
- Tesla instead of HTTPotion? HOT 3
- expose to customize and/or add default HTTPotion options HOT 3
- Wrong markdown indentation in documentation HOT 2
- Deleting the entire index doesn't work HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elastic.