I am trying to generate two terms in the same facets, for example: "terms": [{ "term": "term value", "termtwo": "term value", "count": 0 } .. But only comes with 1 "term" "terms": [{ "term": "term value", "count": 0 } .. I've tried using the "multi fields", in indexing, but without success. Anyone know of any examples or concept sure how to do this? thank you
-- 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 [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Ask for two facets. One for each field. My 2 cents -- David ;-)Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs -- 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 [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Or use the fields parameter on the terms facet which allows faceting over multiple fields. { "query" : { "match_all" : { }
}, "facets" : { "tags" : { "terms" : { "fields" : ["field1", "field2"]
} } } } On Sat, Jun 8, 2013 at 9:48 AM, David Pilato <[hidden email]> wrote:
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 [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
In reply to this post by Murilo de Souza Lopes
I think the problem is the gem tire, because I'm trying to add + 1 terms in facet it is only generating 1. someone working with the tire here? Thanks for the replies. Em sábado, 8 de junho de 2013 12h20min21s UTC-3, Murilo de Souza Lopes escreveu: -- 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 [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Hi All, I also having a similar requirement. My collection have sub documents and the sub document contains three properties (Code, Description and Type). I basically wants to get distinct Code, Description and Type as TERM from the sub document (may be separated with some characters in between) and I want to display all three values in the interface. Thanks in advance. Regards, Kiran On Sunday, June 9, 2013 1:07:58 AM UTC+5:30, Murilo de Souza Lopes wrote: -- 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 [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
This post has NOT been accepted by the mailing list yet.
hi all,
I have save requirement. my solution is, do term facet against each field, and add bool filter, which 'must' term filters against other fields, into it.
|
In reply to this post by Kiranpvuthaman
Hi
I did it by using scripts and parsing the response at client side. { "size": 0, "facets": { "my_facet": { "terms": { "script_field": "_source.field1 + ' ~~~ ' + _source.field2", "size": 10 } } } } Possible to do on any number of fields, but this concepts does not work so great when nested arrays or multi-valued fields are involved. Also its memory intensive. - Sujoy. On Sunday, June 9, 2013 2:12:41 AM UTC+5:30, Kiran Uthaman wrote:
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 [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
thanks for the tip 2013/6/10 Sujoy Sett <[hidden email]> Hi Murilo de Souza Lopes 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 [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Free forum by Nabble | Edit this page |