Generate two terms in facets

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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ask for two facets. One for each field.

My 2 cents

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 8 juin 2013 à 17:20, Murilo de Souza Lopes murilosl@gmail.com a écrit :

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 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.

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 david@pilato.fr wrote:

Ask for two facets. One for each field.

My 2 cents

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 8 juin 2013 à 17:20, Murilo de Souza Lopes murilosl@gmail.com a
écrit :

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 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.

--
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.

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:

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 elasticsearch+unsubscribe@googlegroups.com.
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:

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:

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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

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.

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:

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:

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 elasticsearch+unsubscribe@.
For more options, visit https://groups.google.com/groups/opt_out.

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:

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:

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:

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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

thanks for the tip

2013/6/10 Sujoy Sett sujoysett@gmail.com

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:

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:

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:

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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.