All values for a given field

Hi,

I'm trying to build an IHM (with elastic.js & d3.js), and whish to get all
the values for a given field. Is it safe & efficient to use a match_all
query with term facet ?

Thanks.

Yann

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

Hey,

what is a IHM? :slight_smile: Depending on the field you might return tons of values
and facets will require to pass in a #size. if you oversize this to a large
number you might run into problems quickly but if you only need a top N
list this should be fine

simon

On Tuesday, February 19, 2013 9:28:32 AM UTC+1, Yann Barraud wrote:

Hi,

I'm trying to build an IHM (with elastic.js & d3.js), and whish to get all
the values for a given field. Is it safe & efficient to use a match_all
query with term facet ?

Thanks.

Yann

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

Sorry, switching between FR/EN/PT. IHM (fr) = GUI (en).

I normally won't have tons of values. I need juust a list of available
values of a given field (SQL : select DISTINCT(filed) from TABLE).

I thought doing this using :
{
"query" : {
"match_all" : { }
},
"facets" : {
"tag" : {
"terms" : {
"field" : "STRINGVALUE",
"all_terms" : true
}
}
}
}

Le mardi 19 février 2013 10:32:33 UTC+1, simonw a écrit :

Hey,

what is a IHM? :slight_smile: Depending on the field you might return tons of values
and facets will require to pass in a #size. if you oversize this to a large
number you might run into problems quickly but if you only need a top N
list this should be fine

simon

On Tuesday, February 19, 2013 9:28:32 AM UTC+1, Yann Barraud wrote:

Hi,

I'm trying to build an IHM (with elastic.js & d3.js), and whish to get
all the values for a given field. Is it safe & efficient to use a match_all
query with term facet ?

Thanks.

Yann

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

yeah unless your values grow large this should be safe to do.

simon

On Tuesday, February 19, 2013 10:48:52 AM UTC+1, Yann Barraud wrote:

Sorry, switching between FR/EN/PT. IHM (fr) = GUI (en).

I normally won't have tons of values. I need juust a list of available
values of a given field (SQL : select DISTINCT(filed) from TABLE).

I thought doing this using :
{
"query" : {
"match_all" : { }
},
"facets" : {
"tag" : {
"terms" : {
"field" : "STRINGVALUE",
"all_terms" : true
}
}
}
}

Le mardi 19 février 2013 10:32:33 UTC+1, simonw a écrit :

Hey,

what is a IHM? :slight_smile: Depending on the field you might return tons of values
and facets will require to pass in a #size. if you oversize this to a large
number you might run into problems quickly but if you only need a top N
list this should be fine

simon

On Tuesday, February 19, 2013 9:28:32 AM UTC+1, Yann Barraud wrote:

Hi,

I'm trying to build an IHM (with elastic.js & d3.js), and whish to get
all the values for a given field. Is it safe & efficient to use a match_all
query with term facet ?

Thanks.

Yann

--
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 Simon !

Le mardi 19 février 2013 10:54:56 UTC+1, simonw a écrit :

yeah unless your values grow large this should be safe to do.

simon

On Tuesday, February 19, 2013 10:48:52 AM UTC+1, Yann Barraud wrote:

Sorry, switching between FR/EN/PT. IHM (fr) = GUI (en).

I normally won't have tons of values. I need juust a list of available
values of a given field (SQL : select DISTINCT(filed) from TABLE).

I thought doing this using :
{
"query" : {
"match_all" : { }
},
"facets" : {
"tag" : {
"terms" : {
"field" : "STRINGVALUE",
"all_terms" : true
}
}
}
}

Le mardi 19 février 2013 10:32:33 UTC+1, simonw a écrit :

Hey,

what is a IHM? :slight_smile: Depending on the field you might return tons of values
and facets will require to pass in a #size. if you oversize this to a large
number you might run into problems quickly but if you only need a top N
list this should be fine

simon

On Tuesday, February 19, 2013 9:28:32 AM UTC+1, Yann Barraud wrote:

Hi,

I'm trying to build an IHM (with elastic.js & d3.js), and whish to get
all the values for a given field. Is it safe & efficient to use a match_all
query with term facet ?

Thanks.

Yann

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