CustomScoreQueryBuilder api working strangely


(nachiket) #1

Hi.
I am using Custom Score query in my project.
It needs mainly 2 things: Query and Script.
For normal queries it works fine.
But if I put a nested query like bool query, then it puts script in
wrong position.
Is there a mistake in the api or am I not writing it correctly?

My code is at git://gist.github.com/1096535.git.
(The script is not at the query position.)

Can anybody please help me on this?

Regards.


(Shay Banon) #2

Heya,

Its a bug in how the boosting query builder generates the query, fixed in
0.17 branch and master:
https://github.com/elasticsearch/elasticsearch/issues/1141.

-shay.banon

On Thu, Jul 21, 2011 at 8:27 AM, nachiket bhagwat <nachiketbhagwat@gmail.com

wrote:

Hi.
I am using Custom Score query in my project.
It needs mainly 2 things: Query and Script.
For normal queries it works fine.
But if I put a nested query like bool query, then it puts script in
wrong position.
Is there a mistake in the api or am I not writing it correctly?

My code is at git://gist.github.com/1096535.git.
(The script is not at the query position.)

Can anybody please help me on this?

Regards.


(nachiket) #3

Hi.
I upgraded to 0.17.1 and then too the problem persisted.
My code is at https://gist.github.com/1101431.
Can someone take a look at it?

Regards.

On Jul 21, 11:18 am, Shay Banon shay.ba...@elasticsearch.com wrote:

Heya,

Its a bug in how the boosting query builder generates the query, fixed in
0.17 branch and master:https://github.com/elasticsearch/elasticsearch/issues/1141.

-shay.banon

On Thu, Jul 21, 2011 at 8:27 AM, nachiket bhagwat <nachiketbhag...@gmail.com

wrote:
Hi.
I am using Custom Score query in my project.
It needs mainly 2 things: Query and Script.
For normal queries it works fine.
But if I put a nested query like bool query, then it puts script in
wrong position.
Is there a mistake in the api or am I not writing it correctly?

My code is at git://gist.github.com/1096535.git.
(The script is not at the query position.)

Can anybody please help me on this?

Regards.


(Shay Banon) #4

It will be fixed in 0.17.2 (check the tags at:
https://github.com/elasticsearch/elasticsearch/issues/1141)

On Sat, Jul 23, 2011 at 4:33 PM, nachiket bhagwat <nachiketbhagwat@gmail.com

wrote:

Hi.
I upgraded to 0.17.1 and then too the problem persisted.
My code is at https://gist.github.com/1101431.
Can someone take a look at it?

Regards.

On Jul 21, 11:18 am, Shay Banon shay.ba...@elasticsearch.com wrote:

Heya,

Its a bug in how the boosting query builder generates the query, fixed
in
0.17 branch and master:
https://github.com/elasticsearch/elasticsearch/issues/1141.

-shay.banon

On Thu, Jul 21, 2011 at 8:27 AM, nachiket bhagwat <
nachiketbhag...@gmail.com

wrote:
Hi.
I am using Custom Score query in my project.
It needs mainly 2 things: Query and Script.
For normal queries it works fine.
But if I put a nested query like bool query, then it puts script in
wrong position.
Is there a mistake in the api or am I not writing it correctly?

My code is at git://gist.github.com/1096535.git.
(The script is not at the query position.)

Can anybody please help me on this?

Regards.


(system) #5