|
So this is the closest thread I can find that has to do with elastic search, I have a couple of questions that I can't find a definitive answer to regarding arrays and searchability. I'm looking to offload some invoice data to elastic for searching purposes, and I have a couple of fields that I want to represent as a simple array. One would be a payment confirmation #, and a customer could potentially pay an invoice off in more than one payment. So the my plan for the field would be for it to look like this "confirmation_numbers": [12345, etc] Is that a searchable field like that or do I need to mark it nested? Related to that, I then want an array field with all the payment dates, so something like "payment_dates": ["date1", "date2", etc] A. is that field able to be defined as a date type, and B) is that field searchable using "from" and "to" with that layout.
|
# ¿ Nov 17, 2020 18:04 |
|
|
# ¿ Apr 29, 2024 01:20 |
|
Arcsech posted:Elasticsearch doesn't make a distinction between single-value and array fields, so "conf_num": 1234 and "conf_num": [1234, 5678] both have the same mapping/schema and you can have some docs with a single value and some docs with an array in the same index. thanks, just what I was looking for.
|
# ¿ Nov 19, 2020 21:50 |