Custom Scoring on nested objects


(Arny) #1

Hi,
is it possible to add scoring on nested filters?
I can't get it to work.

Right now I'm using CustomFiltersScoreQueryBuilder and adding
nestedFilters to it via NestedFilterBuilder.

Any help appreciated.
Thanks

Arny


(Clinton Gormley) #2

Hi Amy

On Wed, Jan 18, 2012 at 7:16 PM, Arny arny.ok@googlemail.com wrote:

Hi,
is it possible to add scoring on nested filters?
I can't get it to work.

Could you open an issue?

thanks

Clint

Right now I'm using CustomFiltersScoreQueryBuilder and adding
nestedFilters to it via NestedFilterBuilder.

Any help appreciated.
Thanks

Arny


(Shay Banon) #3

What is the problem? Can you gist a curl example?

On Wed, Jan 18, 2012 at 8:16 PM, Arny arny.ok@googlemail.com wrote:

Hi,
is it possible to add scoring on nested filters?
I can't get it to work.

Right now I'm using CustomFiltersScoreQueryBuilder and adding
nestedFilters to it via NestedFilterBuilder.

Any help appreciated.
Thanks

Arny


(Arny) #4

I'm using the Java library.
Isn't there an example on how to use CustomFiltersScoreQueryBuilder
with script on nested objects?

On Jan 18, 10:30 pm, Shay Banon kim...@gmail.com wrote:

What is the problem? Can you gist a curl example?

On Wed, Jan 18, 2012 at 8:16 PM, Arny arny...@googlemail.com wrote:

Hi,
is it possible to add scoring on nested filters?
I can't get it to work.

Right now I'm using CustomFiltersScoreQueryBuilder and adding
nestedFilters to it via NestedFilterBuilder.

Any help appreciated.
Thanks

Arny


(Shay Banon) #5

No, there isn't. You are using script in the custom filters score, are you
expecting to be able to use the nested docs values in the script? If so,
you can't, you will only be able to use the parent doc values.

On Wed, Jan 18, 2012 at 11:58 PM, Arny arny.ok@googlemail.com wrote:

I'm using the Java library.
Isn't there an example on how to use CustomFiltersScoreQueryBuilder
with script on nested objects?

On Jan 18, 10:30 pm, Shay Banon kim...@gmail.com wrote:

What is the problem? Can you gist a curl example?

On Wed, Jan 18, 2012 at 8:16 PM, Arny arny...@googlemail.com wrote:

Hi,
is it possible to add scoring on nested filters?
I can't get it to work.

Right now I'm using CustomFiltersScoreQueryBuilder and adding
nestedFilters to it via NestedFilterBuilder.

Any help appreciated.
Thanks

Arny


(Arny) #6

Oh, that would explain why my score is dropping to zero when I'm
trying to use script on nested objects.
Is this hard to implement by ES or why is it not supported?

On Jan 18, 11:06 pm, Shay Banon kim...@gmail.com wrote:

No, there isn't. You are using script in the custom filters score, are you
expecting to be able to use the nested docs values in the script? If so,
you can't, you will only be able to use the parent doc values.

On Wed, Jan 18, 2012 at 11:58 PM, Arny arny...@googlemail.com wrote:

I'm using the Java library.
Isn't there an example on how to use CustomFiltersScoreQueryBuilder
with script on nested objects?

On Jan 18, 10:30 pm, Shay Banon kim...@gmail.com wrote:

What is the problem? Can you gist a curl example?

On Wed, Jan 18, 2012 at 8:16 PM, Arny arny...@googlemail.com wrote:

Hi,
is it possible to add scoring on nested filters?
I can't get it to work.

Right now I'm using CustomFiltersScoreQueryBuilder and adding
nestedFilters to it via NestedFilterBuilder.

Any help appreciated.
Thanks

Arny


(Shay Banon) #7

Its just that you can't do it in the custom_filters_score, you can use a
nested query, and have a custom score query in it that will have a script
that works on values associated with each nested doc.

On Thu, Jan 19, 2012 at 2:07 AM, Arny arny.ok@googlemail.com wrote:

Oh, that would explain why my score is dropping to zero when I'm
trying to use script on nested objects.
Is this hard to implement by ES or why is it not supported?

On Jan 18, 11:06 pm, Shay Banon kim...@gmail.com wrote:

No, there isn't. You are using script in the custom filters score, are
you
expecting to be able to use the nested docs values in the script? If so,
you can't, you will only be able to use the parent doc values.

On Wed, Jan 18, 2012 at 11:58 PM, Arny arny...@googlemail.com wrote:

I'm using the Java library.
Isn't there an example on how to use CustomFiltersScoreQueryBuilder
with script on nested objects?

On Jan 18, 10:30 pm, Shay Banon kim...@gmail.com wrote:

What is the problem? Can you gist a curl example?

On Wed, Jan 18, 2012 at 8:16 PM, Arny arny...@googlemail.com
wrote:

Hi,
is it possible to add scoring on nested filters?
I can't get it to work.

Right now I'm using CustomFiltersScoreQueryBuilder and adding
nestedFilters to it via NestedFilterBuilder.

Any help appreciated.
Thanks

Arny


(system) #8