I'm fairly new to ES and am using it for a new project of mine. Starting off, I have a simple mapping for a customer, which has a first and last name, and a list of payment information objects. If I were doing this in SQL, it would be something like a customer table, and a payment info table with a 1:many relationship.
I'm hoping to find any customer based on any match in the nested array of paymentInfos, i.e. finding any users who've had a paymentInfo with billingZip 10101. This query returns no results, and I'm not sure why. Can anyone point me in the right direction as to why this query doesn't work, and if there are any changes I can make to either my query or mapping to have it return the user properly?
Some notes (only to be applied on curl recreation scripts):
Wait for yellow when you create an index
Add a refresh after indexing a document
When searching in nested, use nested filters.
I'm fairly new to ES and am using it for a new project of mine. Starting
off, I have a simple mapping for a customer, which has a first and last
name, and a list of payment information objects. If I were doing this in
SQL, it would be something like a customer table, and a payment info table
with a 1:many relationship.
I'm hoping to find any customer based on any match in the nested array of
paymentInfos, i.e. finding any users who've had a paymentInfo with
billingZip 10101. This query returns no results, and I'm not sure why. Can
anyone point me in the right direction as to why this query doesn't work,
and if there are any changes I can make to either my query or mapping to
have it return the user properly?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.