"Sorting" with has_child and custom_score not working


(q42jaap) #1

I've recreated the example Martijn presented at #bbuzz and tried to make
the sorting by price work.
However, the scoring script doesn't seem to be working.

The individual scores for the product hits are just 1.0 and not related to
the price of the offer...

What am I doing wrong here?

Jaap

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Martijn Van Groningen) #2

Hi Jaap,

There is a mistake in my extra slide about child sorting. The score_mode is
by default none and scores aren't kept. I added an comment to your gist. I
think it make sense to add score_mode min to this query (sorting by
cheapest offer).

Martijn

On 5 June 2013 10:22, Jaap Taal jaap@q42.nl wrote:

https://gist.github.com/q42jaap/5712231

I've recreated the example Martijn presented at #bbuzz and tried to make
the sorting by price work.
However, the scoring script doesn't seem to be working.

The individual scores for the product hits are just 1.0 and not related to
the price of the offer...

What am I doing wrong here?

Jaap

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Met vriendelijke groet,

Martijn van Groningen

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Martijn Van Groningen) #3

Btw: I updated my slides.

On 5 June 2013 16:34, Martijn v Groningen martijn.v.groningen@gmail.comwrote:

Hi Jaap,

There is a mistake in my extra slide about child sorting. The score_mode
is by default none and scores aren't kept. I added an comment to your gist.
I think it make sense to add score_mode min to this query (sorting by
cheapest offer).

Martijn

On 5 June 2013 10:22, Jaap Taal jaap@q42.nl wrote:

https://gist.github.com/q42jaap/5712231

I've recreated the example Martijn presented at #bbuzz and tried to make
the sorting by price work.
However, the scoring script doesn't seem to be working.

The individual scores for the product hits are just 1.0 and not related
to the price of the offer...

What am I doing wrong here?

Jaap

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(q42jaap) #4

Hey Martijn,

I'm getting the following exception:
QueryParsingException[[products] [has_child] query does not support
[score_mode]]

I'm on version:

  • version: {
    • number: 0.90.0
    • snapshot_build: false
      }

Do I need to upgrade to get it to work?

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Wed, Jun 5, 2013 at 5:30 PM, Martijn v Groningen <
martijn.v.groningen@gmail.com> wrote:

Btw: I updated my slides.

On 5 June 2013 16:34, Martijn v Groningen martijn.v.groningen@gmail.comwrote:

Hi Jaap,

There is a mistake in my extra slide about child sorting. The score_mode
is by default none and scores aren't kept. I added an comment to your gist.
I think it make sense to add score_mode min to this query (sorting by
cheapest offer).

Martijn

On 5 June 2013 10:22, Jaap Taal jaap@q42.nl wrote:

https://gist.github.com/q42jaap/5712231

I've recreated the example Martijn presented at #bbuzz and tried to make
the sorting by price work.
However, the scoring script doesn't seem to be working.

The individual scores for the product hits are just 1.0 and not related
to the price of the offer...

What am I doing wrong here?

Jaap

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/GzM1EePOfn4/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(q42jaap) #5

I upgraded to 0.90.1, and score_type is now recognized. However I expected
to be able to use "min" as a value, but I couldn't.
The docs mention this, but not why the "min" value is not supported. So
why's that (what's the technical reason behind it?)

In my case it's not difficult to negate the price value and use max.

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Thu, Jun 6, 2013 at 9:53 AM, Jaap Taal jaap@q42.nl wrote:

Hey Martijn,

I'm getting the following exception:
QueryParsingException[[products] [has_child] query does not support
[score_mode]]

I'm on version:

  • version: {
    • number: 0.90.0
    • snapshot_build: false
      }

Do I need to upgrade to get it to work?

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Wed, Jun 5, 2013 at 5:30 PM, Martijn v Groningen <
martijn.v.groningen@gmail.com> wrote:

Btw: I updated my slides.

On 5 June 2013 16:34, Martijn v Groningen martijn.v.groningen@gmail.comwrote:

Hi Jaap,

There is a mistake in my extra slide about child sorting. The score_mode
is by default none and scores aren't kept. I added an comment to your gist.
I think it make sense to add score_mode min to this query (sorting by
cheapest offer).

Martijn

On 5 June 2013 10:22, Jaap Taal jaap@q42.nl wrote:

https://gist.github.com/q42jaap/5712231

I've recreated the example Martijn presented at #bbuzz and tried to
make the sorting by price work.
However, the scoring script doesn't seem to be working.

The individual scores for the product hits are just 1.0 and not related
to the price of the offer...

What am I doing wrong here?

Jaap

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/GzM1EePOfn4/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(q42jaap) #6

I mean sort_mode of course

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Thu, Jun 6, 2013 at 9:59 AM, Jaap Taal jaap@q42.nl wrote:

I upgraded to 0.90.1, and score_type is now recognized. However I expected
to be able to use "min" as a value, but I couldn't.
The docs mention this, but not why the "min" value is not supported. So
why's that (what's the technical reason behind it?)

In my case it's not difficult to negate the price value and use max.

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Thu, Jun 6, 2013 at 9:53 AM, Jaap Taal jaap@q42.nl wrote:

Hey Martijn,

I'm getting the following exception:
QueryParsingException[[products] [has_child] query does not support
[score_mode]]

I'm on version:

  • version: {
    • number: 0.90.0
    • snapshot_build: false
      }

Do I need to upgrade to get it to work?

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Wed, Jun 5, 2013 at 5:30 PM, Martijn v Groningen <
martijn.v.groningen@gmail.com> wrote:

Btw: I updated my slides.

On 5 June 2013 16:34, Martijn v Groningen <martijn.v.groningen@gmail.com

wrote:

Hi Jaap,

There is a mistake in my extra slide about child sorting. The
score_mode is by default none and scores aren't kept. I added an comment to
your gist. I think it make sense to add score_mode min to this query
(sorting by cheapest offer).

Martijn

On 5 June 2013 10:22, Jaap Taal jaap@q42.nl wrote:

https://gist.github.com/q42jaap/5712231

I've recreated the example Martijn presented at #bbuzz and tried to
make the sorting by price work.
However, the scoring script doesn't seem to be working.

The individual scores for the product hits are just 1.0 and not
related to the price of the offer...

What am I doing wrong here?

Jaap

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/GzM1EePOfn4/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Martijn Van Groningen) #7

Hi Jaap,

The option score_mode was added in version 0.90.1 to be more consistent
with the nested query. Versions before 0.90.1 only supported the
score_type option. There is no technical reason and adding score_mode
option min shouldn't be that difficult.

Martijn

On 6 June 2013 10:01, Jaap Taal jaap@q42.nl wrote:

I mean sort_mode of course

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Thu, Jun 6, 2013 at 9:59 AM, Jaap Taal jaap@q42.nl wrote:

I upgraded to 0.90.1, and score_type is now recognized. However I
expected to be able to use "min" as a value, but I couldn't.
The docs mention this, but not why the "min" value is not supported. So
why's that (what's the technical reason behind it?)

In my case it's not difficult to negate the price value and use max.

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Thu, Jun 6, 2013 at 9:53 AM, Jaap Taal jaap@q42.nl wrote:

Hey Martijn,

I'm getting the following exception:
QueryParsingException[[products] [has_child] query does not support
[score_mode]]

I'm on version:

  • version: {
    • number: 0.90.0
    • snapshot_build: false
      }

Do I need to upgrade to get it to work?

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Wed, Jun 5, 2013 at 5:30 PM, Martijn v Groningen <
martijn.v.groningen@gmail.com> wrote:

Btw: I updated my slides.

On 5 June 2013 16:34, Martijn v Groningen <
martijn.v.groningen@gmail.com> wrote:

Hi Jaap,

There is a mistake in my extra slide about child sorting. The
score_mode is by default none and scores aren't kept. I added an comment to
your gist. I think it make sense to add score_mode min to this query
(sorting by cheapest offer).

Martijn

On 5 June 2013 10:22, Jaap Taal jaap@q42.nl wrote:

https://gist.github.com/q42jaap/5712231

I've recreated the example Martijn presented at #bbuzz and tried to
make the sorting by price work.
However, the scoring script doesn't seem to be working.

The individual scores for the product hits are just 1.0 and not
related to the price of the offer...

What am I doing wrong here?

Jaap

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/GzM1EePOfn4/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Met vriendelijke groet,

Martijn van Groningen

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(q42jaap) #8

Hi Martijn,

I tried making the min option in ScoreType, and that seems to be working,
but that only counts for children with the same parent. I would also need
to make the whole query sort_mode:min, which makes no sense at all in a
full text context.

So I guess max with negative values automatically works for collapsing the
child values because the whole query will also be scored with a max mode.

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Thu, Jun 6, 2013 at 10:13 AM, Martijn v Groningen <
martijn.v.groningen@gmail.com> wrote:

Hi Jaap,

The option score_mode was added in version 0.90.1 to be more consistent
with the nested query. Versions before 0.90.1 only supported the
score_type option. There is no technical reason and adding score_mode
option min shouldn't be that difficult.

Martijn

On 6 June 2013 10:01, Jaap Taal jaap@q42.nl wrote:

I mean sort_mode of course

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Thu, Jun 6, 2013 at 9:59 AM, Jaap Taal jaap@q42.nl wrote:

I upgraded to 0.90.1, and score_type is now recognized. However I
expected to be able to use "min" as a value, but I couldn't.
The docs mention this, but not why the "min" value is not supported. So
why's that (what's the technical reason behind it?)

In my case it's not difficult to negate the price value and use max.

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Thu, Jun 6, 2013 at 9:53 AM, Jaap Taal jaap@q42.nl wrote:

Hey Martijn,

I'm getting the following exception:
QueryParsingException[[products] [has_child] query does not support
[score_mode]]

I'm on version:

  • version: {
    • number: 0.90.0
    • snapshot_build: false
      }

Do I need to upgrade to get it to work?

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Wed, Jun 5, 2013 at 5:30 PM, Martijn v Groningen <
martijn.v.groningen@gmail.com> wrote:

Btw: I updated my slides.

On 5 June 2013 16:34, Martijn v Groningen <
martijn.v.groningen@gmail.com> wrote:

Hi Jaap,

There is a mistake in my extra slide about child sorting. The
score_mode is by default none and scores aren't kept. I added an comment to
your gist. I think it make sense to add score_mode min to this query
(sorting by cheapest offer).

Martijn

On 5 June 2013 10:22, Jaap Taal jaap@q42.nl wrote:

https://gist.github.com/q42jaap/5712231

I've recreated the example Martijn presented at #bbuzz and tried to
make the sorting by price work.
However, the scoring script doesn't seem to be working.

The individual scores for the product hits are just 1.0 and not
related to the price of the offer...

What am I doing wrong here?

Jaap

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/GzM1EePOfn4/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Met vriendelijke groet,

Martijn van Groningen

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/GzM1EePOfn4/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Martijn Van Groningen) #9

Makes sense what you're saying. The work around isn't perfect, but I think
this is as good as it gets without the sorting by child fields support.

On 7 June 2013 11:43, Jaap Taal jaap@q42.nl wrote:

Hi Martijn,

I tried making the min option in ScoreType, and that seems to be working,
but that only counts for children with the same parent. I would also need
to make the whole query sort_mode:min, which makes no sense at all in a
full text context.

So I guess max with negative values automatically works for collapsing the
child values because the whole query will also be scored with a max mode.

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Thu, Jun 6, 2013 at 10:13 AM, Martijn v Groningen <
martijn.v.groningen@gmail.com> wrote:

Hi Jaap,

The option score_mode was added in version 0.90.1 to be more consistent
with the nested query. Versions before 0.90.1 only supported the
score_type option. There is no technical reason and adding score_mode
option min shouldn't be that difficult.

Martijn

On 6 June 2013 10:01, Jaap Taal jaap@q42.nl wrote:

I mean sort_mode of course

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Thu, Jun 6, 2013 at 9:59 AM, Jaap Taal jaap@q42.nl wrote:

I upgraded to 0.90.1, and score_type is now recognized. However I
expected to be able to use "min" as a value, but I couldn't.
The docs mention this, but not why the "min" value is not supported. So
why's that (what's the technical reason behind it?)

In my case it's not difficult to negate the price value and use max.

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Thu, Jun 6, 2013 at 9:53 AM, Jaap Taal jaap@q42.nl wrote:

Hey Martijn,

I'm getting the following exception:
QueryParsingException[[products] [has_child] query does not support
[score_mode]]

I'm on version:

  • version: {
    • number: 0.90.0
    • snapshot_build: false
      }

Do I need to upgrade to get it to work?

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Wed, Jun 5, 2013 at 5:30 PM, Martijn v Groningen <
martijn.v.groningen@gmail.com> wrote:

Btw: I updated my slides.

On 5 June 2013 16:34, Martijn v Groningen <
martijn.v.groningen@gmail.com> wrote:

Hi Jaap,

There is a mistake in my extra slide about child sorting. The
score_mode is by default none and scores aren't kept. I added an comment to
your gist. I think it make sense to add score_mode min to this query
(sorting by cheapest offer).

Martijn

On 5 June 2013 10:22, Jaap Taal jaap@q42.nl wrote:

https://gist.github.com/q42jaap/5712231

I've recreated the example Martijn presented at #bbuzz and tried to
make the sorting by price work.
However, the scoring script doesn't seem to be working.

The individual scores for the product hits are just 1.0 and not
related to the price of the offer...

What am I doing wrong here?

Jaap

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
You received this message because you are subscribed to a topic in
the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/GzM1EePOfn4/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Met vriendelijke groet,

Martijn van Groningen

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/GzM1EePOfn4/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Met vriendelijke groet,

Martijn van Groningen

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Derek Perkins) #10

Martijn - Where can we find the updated copies of your slides?

On Friday, June 7, 2013 6:19:35 AM UTC-6, Martijn v Groningen wrote:

Makes sense what you're saying. The work around isn't perfect, but I think
this is as good as it gets without the sorting by child fields support.

On 7 June 2013 11:43, Jaap Taal <ja...@q42.nl <javascript:>> wrote:

Hi Martijn,

I tried making the min option in ScoreType, and that seems to be working,
but that only counts for children with the same parent. I would also need
to make the whole query sort_mode:min, which makes no sense at all in a
full text context.

So I guess max with negative values automatically works for collapsing
the child values because the whole query will also be scored with a max
mode.

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Thu, Jun 6, 2013 at 10:13 AM, Martijn v Groningen <
martijn.v...@gmail.com <javascript:>> wrote:

Hi Jaap,

The option score_mode was added in version 0.90.1 to be more
consistent with the nested query. Versions before 0.90.1 only supported
the score_type option. There is no technical reason and adding score_mode
option min shouldn't be that difficult.

Martijn

On 6 June 2013 10:01, Jaap Taal <ja...@q42.nl <javascript:>> wrote:

I mean sort_mode of course

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Thu, Jun 6, 2013 at 9:59 AM, Jaap Taal <ja...@q42.nl <javascript:>>wrote:

I upgraded to 0.90.1, and score_type is now recognized. However I
expected to be able to use "min" as a value, but I couldn't.
The docs mention this, but not why the "min" value is not supported.
So why's that (what's the technical reason behind it?)

In my case it's not difficult to negate the price value and use max.

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Thu, Jun 6, 2013 at 9:53 AM, Jaap Taal <ja...@q42.nl <javascript:>>wrote:

Hey Martijn,

I'm getting the following exception:
QueryParsingException[[products] [has_child] query does not support
[score_mode]]

I'm on version:

  • version: {
    • number: 0.90.0
    • snapshot_build: false
      }

Do I need to upgrade to get it to work?

Jaap Taal

[ Q42 | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Oostelijke Handelskade 749, Amsterdam | KvK
30164662 ]

On Wed, Jun 5, 2013 at 5:30 PM, Martijn v Groningen <
martijn.v...@gmail.com <javascript:>> wrote:

Btw: I updated my slides.

On 5 June 2013 16:34, Martijn v Groningen <martijn.v...@gmail.com<javascript:>

wrote:

Hi Jaap,

There is a mistake in my extra slide about child sorting. The
score_mode is by default none and scores aren't kept. I added an comment to
your gist. I think it make sense to add score_mode min to this query
(sorting by cheapest offer).

Martijn

On 5 June 2013 10:22, Jaap Taal <ja...@q42.nl <javascript:>> wrote:

https://gist.github.com/q42jaap/5712231

I've recreated the example Martijn presented at #bbuzz and tried
to make the sorting by price work.
However, the scoring script doesn't seem to be working.

The individual scores for the product hits are just 1.0 and not
related to the price of the offer...

What am I doing wrong here?

Jaap

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
You received this message because you are subscribed to a topic in
the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/GzM1EePOfn4/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email to
elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
Met vriendelijke groet,

Martijn van Groningen

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/GzM1EePOfn4/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email to
elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
Met vriendelijke groet,

Martijn van Groningen

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #11