Search that works with curl but throw SearchPhaseExecutionException when using Java

Hi there,

I have some trouble while playing with ES.

I push an entity (a bit complex) to a clean ES :

It works.

Then, I search it with curl :

It works. I find my document.

Then I do it again with Java :

It fails with a SearchPhaseExecutionException. Here is the stacktrace :

When I search with a less deeper property, java search works (and curl also
! ;-)).

So, is there anything wrong with my document mapping ? I'm using the default
mapping provided by ES.

Perhaps, the way I wrote my java search is wrong.

Any help will be appreciated.

Cheers,

David.

Full gist here : https://gist.github.com/897892

Hi there,

Any idea about this problem ?
Do you want me to open a bug about it ?

Thanks,
David

Heya,

Narrowed it down to a bug in the smile format used (optimized json). You can hack around it by forcing ES to use Json by setting Requests.CONTENT_TYPE to XContentType.JSON (its a static value).

I will follow up with jackson and report back.
On Friday, April 1, 2011 at 11:50 AM, David Pilato wrote:

Hi there,

I have some trouble while playing with ES.

I push an entity (a bit complex) to a clean ES :
Exception when searching docs in ES with Java · GitHub

It works.

Then, I search it with curl :
Exception when searching docs in ES with Java · GitHub

It works. I find my document.

Then I do it again with Java :
Exception when searching docs in ES with Java · GitHub

It fails with a SearchPhaseExecutionException. Here is the stacktrace : Exception when searching docs in ES with Java · GitHub

When I search with a less deeper property, java search works (and curl also ! ;-)).

So, is there anything wrong with my document mapping ? I’m using the default mapping provided by ES.
Perhaps, the way I wrote my java search is wrong…

Any help will be appreciated.
Cheers,
David.

Full gist here : Exception when searching docs in ES with Java · GitHub

Just to close this thread (in case of somebody find the same issue), Kimchy opened a JIRA on this : JACKSON-552.

It will be in the next 1.7.6 release of Jackson and perhaps in the next 0.16.0 release of Elastic.

Thanks for your help. The hack works fine...