Search single array record

hello..

I have an array that looks like this...

"upcs": [
{"id": "CTL BR NTRL FNTN PRMS MZRL ASG PRVL RMN SIX CHS
ITLN FNCY SHRD BAG 8 OZ 200469352962
"},
{"id": "SRGN NTRL FNTN PRMS MZRL ASG PRVL RMN SIX CHS
ITLN SHRD BAG 28 OZ 004610030098"},
{"id": "CRYS FRM MNTR JCK PRMS MZRL ASG PRVL RMN PST GRLC
SIX CHS ITLN FNLY SHRD 8 OZ 007592529995"},
]

when i run a query like so...

"query":{ "match":{"upcs.id":"ctl br ntrl fntn prms mzrl asg prvl rmn six
chs itln fncy shrd bag 8 oz 200469352962
"} }

it correctly matches the record, but it returns the entire array

is it possible to only return the item in the array that was matched

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 can probably do that with highlighting

On Thu, Apr 25, 2013 at 11:19 PM, eric sanford <pcstechnologiesinc@gmail.com

wrote:

hello..

I have an array that looks like this...

"upcs": [
{"id": "CTL BR NTRL FNTN PRMS MZRL ASG PRVL RMN SIX
CHS ITLN FNCY SHRD BAG 8 OZ 200469352962
"},
{"id": "SRGN NTRL FNTN PRMS MZRL ASG PRVL RMN SIX CHS
ITLN SHRD BAG 28 OZ 004610030098"},
{"id": "CRYS FRM MNTR JCK PRMS MZRL ASG PRVL RMN PST
GRLC SIX CHS ITLN FNLY SHRD 8 OZ 007592529995"},
]

when i run a query like so...

"query":{ "match":{"upcs.id":"ctl br ntrl fntn prms mzrl asg prvl rmn
six chs itln fncy shrd bag 8 oz 200469352962
"} }

it correctly matches the record, but it returns the entire array

is it possible to only return the item in the array that was matched

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.