Search that works with curl but throw SearchPhaseExecutionException when using Java


(dpilato) #1

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


(dpilato) #2

Hi there,

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

Thanks,
David


(Shay Banon) #3

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 :
https://gist.github.com/897892#file_index.sh

It works.

Then, I search it with curl :
https://gist.github.com/897892#file_search.sh

It works. I find my document.

Then I do it again with Java :
https://gist.github.com/897892#file_es_test_case.java

It fails with a SearchPhaseExecutionException. Here is the stacktrace : https://gist.github.com/897892#file_stack_trace.txt

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


(dpilato) #4

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...


(system) #5