I am in reference to Spring Data Elasticsearch's CriteriaQuery
and SearchQuery
(both from org.springframework.data.elasticsearch.core.query
package).
I am not sure when I should be using a SearchQuery
(or its implementation) or a CriteriaQuery
.
It seems the SearchQuery
relies upon elasticsearch's native QueryBuilders
whereas the CriteriaQuery
is specific to Spring Data. Is this right?
Can someone please point out the difference between these two types of Query?