Multiple filters on multi field type

I have a "multi field" type field each of whos values in object. i.e.

myField = [ { some_date : '2013-09-01T00:00:00', some_int : 4 }, {
some_date : '2013-09-08T00:00:00', some_int : 2 } ]

I would like to create a filter that matches some_date and some_int within
the same object
. I.e. the following would not match:

myField.some_date = '2013-09-08T00:00:00'
myField.some_int = 4

But the following would match:

myField.some_date = '2013-09-08T00:00:00'
myField.some_int = 2

Does that make sense? Is this possible without resorting to a script field?

Thanks in advance

--

With that document, ES will index:
myField.some_date: [' 2013-09-01T00:00:00', '2013-09-08T00:00:00']
myField.some_int: [4, 2]

As you can see, all values are flattened.

If you want to search in inner objects, look at nested type
http://www.elasticsearch.org/guide/reference/mapping/nested-type.html .

HTH
David.

Le 21 janvier 2013 à 14:02, Dominic Watson watson.dominic@googlemail.com a
écrit :

I have a "multi field" type field each of whos values in object. i.e.

myField = [ { some_date : '2013-09-01T00:00:00', some_int : 4 }, { some_date
: '2013-09-08T00:00:00', some_int : 2 } ]

I would like to create a filter that matches some_date and some_int within
the same object
. I.e. the following would not match:

myField.some_date = '2013-09-08T00:00:00'
myField.some_int = 4

But the following would match:

myField.some_date = '2013-09-08T00:00:00'
myField.some_int = 2

Does that make sense? Is this possible without resorting to a script field?

Thanks in advance

--

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

Perfect, thanks David.

On Monday, 21 January 2013 13:35:00 UTC, David Pilato wrote:

With that document, ES will index:
myField.some_date: [' 2013-09-01T00:00:00', '2013-09-08T00:00:00']
myField.some_int: [4, 2]

As you can see, all values are flattened.

If you want to search in inner objects, look at nested typehttp://www.elasticsearch.org/guide/reference/mapping/nested-type.html.

HTH
David.

Le 21 janvier 2013 à 14:02, Dominic Watson <watson....@googlemail.com<javascript:>>
a écrit :

I have a "multi field" type field each of whos values in object. i.e.

myField = [ { some_date : '2013-09-01T00:00:00', some_int : 4 }, {
some_date : '2013-09-08T00:00:00', some_int : 2 } ]

I would like to create a filter that matches some_date and some_int
within the same object. I.e. the following would not match:

myField.some_date = '2013-09-08T00:00:00'
myField.some_int = 4

But the following would match:

myField.some_date = '2013-09-08T00:00:00'
myField.some_int = 2

Does that make sense? Is this possible without resorting to a script
field?

Thanks in advance

--

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--