Hi, I hope someone finds this. I am very new to elasticsearch. Currently I have this code snippet in my java file to search based on customer identification card (IC) number.
I am able to fetch and search based off just ONE IC number at a time like this
SearchResponse<MyClass> esResponse = esClient.search((s -> s
.index("loans")
.size(pageSize)
.from(page)
.query(q -> q
.terms(t -> t
.field("ic_number.keyword")
.value(icNum)
)
).sort(so -> so
.field(FieldSort.of(f -> f
.field("date_created")
.order(SortOrder.Desc)
))
)
), MyClass.class);
But I was wondering am I able to search and fetch results from elasticsearch based off a list of IC numbers instead of just one? I read a little about the "terms" query but the documentation doesnt really show anything about the terms query in the Java API Client, therefore I have to seek help from others who are more experienced with this.
Thank you for your time and consideration.