Help needed for faceting query

Hello all,

I wondering if I can write a faceting query for something like this

My document structure

UserID, AnswerID[] (int array)
1 , [9,10,11,56,78,99]
2 , [10,11,56,78,99]
3 , [8,10,12,56, 79,99]
4 , [9,10,11,56,78,99]

If want the count of users who answered 9,56 I can write a query. But I
have two lists

List A - 9,10,11
ListB - 56,78,99

I want the permutation of the two lists.

Count of users who answered [9,56], [9,78], [9,99], [10,56], [10,78],
[10,99], [11,56]...

How do I write a query to achieve something like this.

Any help is appreciated,

Thanks.

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

On single value fields, it could work using a script_field: https://gist.github.com/dadoonet/5370077
I did not find a way to do it on lists. May be Igor or someone else has an idea???

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 12 avr. 2013 à 06:28, Abhishek Andhavarapu abhishek376@gmail.com a écrit :

Hello all,

I wondering if I can write a faceting query for something like this

My document structure

UserID, AnswerID[] (int array)
1 , [9,10,11,56,78,99]
2 , [10,11,56,78,99]
3 , [8,10,12,56, 79,99]
4 , [9,10,11,56,78,99]

If want the count of users who answered 9,56 I can write a query. But I have two lists

List A - 9,10,11
ListB - 56,78,99

I want the permutation of the two lists.

Count of users who answered [9,56], [9,78], [9,99], [10,56], [10,78], [10,99], [11,56]...

How do I write a query to achieve something like this.

Any help is appreciated,

Thanks.

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

Thanks David. How hard is to implement the functionality I was talking
about ? Where do I start ?

On Friday, April 12, 2013 1:04:40 AM UTC-6, David Pilato wrote:

On single value fields, it could work using a script_field:
https://gist.github.com/dadoonet/5370077
I did not find a way to do it on lists. May be Igor or someone else has an
idea???

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr
| @scrutmydocs https://twitter.com/scrutmydocs

Le 12 avr. 2013 à 06:28, Abhishek Andhavarapu <abhis...@gmail.com<javascript:>>
a écrit :

Hello all,

I wondering if I can write a faceting query for something like this

My document structure

UserID, AnswerID[] (int array)
1 , [9,10,11,56,78,99]
2 , [10,11,56,78,99]
3 , [8,10,12,56, 79,99]
4 , [9,10,11,56,78,99]

If want the count of users who answered 9,56 I can write a query. But I
have two lists

List A - 9,10,11
ListB - 56,78,99

I want the permutation of the two lists.

Count of users who answered [9,56], [9,78], [9,99], [10,56], [10,78],
[10,99], [11,56]...

How do I write a query to achieve something like this.

Any help is appreciated,

Thanks.

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

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