Context suggest display results for all the categories (mimic the completion suggester behavior)

Hi, Is there a way to tell the context suggester to display results for all
the categories ?
I know that for the category suggester query I must provide context/s
Sort of:

{
"suggest" : {
"text" : "m",
"completion" : {
"field" : "suggest_field",
"size": 10,
"context": {
"color": "*"
}
}
}
}

This should work like simple completion suggester no matter what "color"
each document has.
So I should be able to find suggestions, and filter them (by "color") only
when needed.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e6a44204-207e-42bc-8bf0-bc60e0869496%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hey,

you could simply index an 'all' color field value for every document, and
then use that for your suggestions?

--Alex

On Mon, Aug 4, 2014 at 10:50 AM, Tihomir Lichev shoteff@gmail.com wrote:

Hi, Is there a way to tell the context suggester to display results for
all the categories ?
I know that for the category suggester query I must provide context/s
Sort of:

{
"suggest" : {
"text" : "m",
"completion" : {
"field" : "suggest_field",
"size": 10,
"context": {
"color": "*"
}
}
}
}

This should work like simple completion suggester no matter what "color"
each document has.
So I should be able to find suggestions, and filter them (by "color") only
when needed.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/e6a44204-207e-42bc-8bf0-bc60e0869496%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/e6a44204-207e-42bc-8bf0-bc60e0869496%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGCwEM8_q_k_CBgmq7C0ir2A1KfZMA%2BiNYGYrieV_aL4_JgW-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Thank you Alex,
I also came up with that idea, but I think it is not that useful when you
have context, mapped to a field, which usually contains a single value,
especially numeric fields (despite that
https://github.com/elasticsearch/elasticsearch/issues/6512 is not fixed yet)

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6ca0e8df-b21a-4f3a-afa5-0b57c91c03c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hey,

maybe the new transform feature could help here to create a default value
(just an idea, havent tested it). See

--Alex

On Tue, Aug 5, 2014 at 10:13 AM, Tihomir Lichev shoteff@gmail.com wrote:

Thank you Alex,
I also came up with that idea, but I think it is not that useful when you
have context, mapped to a field, which usually contains a single value,
especially numeric fields (despite that
Context Suggester: Context does not work with non strings in mapping · Issue #6512 · elastic/elasticsearch · GitHub is not fixed
yet)

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/6ca0e8df-b21a-4f3a-afa5-0b57c91c03c1%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/6ca0e8df-b21a-4f3a-afa5-0b57c91c03c1%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGCwEM9b7Nw-PhVV8WoVq2prx0-egCR94er2SMm%2B3xRM0PLVYw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Thanks Alex,
I made it :slight_smile:
I'm using transformation script to add "*" to any of the context fields.
But I definitely think that issues:

have to be fixed
Probably also provide some way to select any value also for non-string
fields (if issue 6512 end up as toString conversion)

05 август 2014, вторник, 11:41:33 UTC+3, Alexander Reelsen написа:

Hey,

maybe the new transform feature could help here to create a default value
(just an idea, havent tested it). See
Elasticsearch Platform — Find real-time answers at scale | Elastic

--Alex

On Tue, Aug 5, 2014 at 10:13 AM, Tihomir Lichev <sho...@gmail.com
<javascript:>> wrote:

Thank you Alex,
I also came up with that idea, but I think it is not that useful when you
have context, mapped to a field, which usually contains a single value,
especially numeric fields (despite that
Context Suggester: Context does not work with non strings in mapping · Issue #6512 · elastic/elasticsearch · GitHub is not fixed
yet)

--
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:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/6ca0e8df-b21a-4f3a-afa5-0b57c91c03c1%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/6ca0e8df-b21a-4f3a-afa5-0b57c91c03c1%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/5ae47c01-0bc6-465b-a58d-70a4fc2de0fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.