Without seeing the code, I guess your ES cluster is a bit slow in starting
up new shards, which is pretty normal. There is a small time span after
index creation and getting ready for accepting docs. You should wait for
the created index to get initialized. Usually this is not required, because
act
It always easier to share a project for which we only have to do:
git clone
mvn install
But, you could also share on gist.github.com a pom.xml and a test class.
--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> Le 26 janv. 2015 à 19:27, TimOnGmail a écrit :
>
> I could do
I could do that - I'll have to see if I can trim it down to a reasonable
size without all the unrelated code in it.
Is it obvious on GitHub where people can submit error samples? I haven't
done that before.
- Tim
On Friday, January 23, 2015 at 1:27:05 AM UTC-8, David Pilato wrote:
>
> Yes I am
Yes I am.
Client is thread safe. Any chance you could share on github a small project
which reproduce this error?
David
> Le 23 janv. 2015 à 01:18, TimOnGmail a écrit :
>
> I changed the code to use a Singleton. Even so, when I made the indexing and
> searching happen in 2 different threads
I changed the code to use a Singleton. Even so, when I made the indexing
and searching happen in 2 different threads (without waiting for responses
- just ignoring the returned future), it failed similarly - even if I
waited for awhile before issuing the search.
If I did the same thing, but di
Answers inlined
--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> Le 22 janv. 2015 à 20:19, TimOnGmail a écrit :
>
> Thanks for your suggestions!
>
> I'm generally created a fresh client for each index/search request. So
> that's not correct? I had thought it was better
Thanks for your suggestions!
I'm generally created a fresh client for each index/search request. So
that's not correct? I had thought it was better to do it that way.
Any problems with using separate clients in the same VM, different threads,
that you know of?
The indexes are already created
Some ideas:
You can/should share the same client within all threads. So only one client for
the full JVM.
You should create first the index and wait for the index to be created, using
actionGet(). It's a quick operation. Then run your code as you wrote.
My 2 cents.
David
> Le 22 janv. 2015 à
I have a situation where, using the Java API, I initiate a bunch of
indexing operations, but throw away the Future object (I don't need the
return status). This is so I can do a lot of indexing reasonably
asynchronously, so I don't have to hold up the GUI that triggers these
calls.
However, i