Reputation: 855
It is a good solution for convenience, if I put some data into elasticsearch index, which fields only using in _source parameter, not for search, or sort? Theese datas are stored in SQL too, but it's easier to access from elasticsearch, not needed plus SQL call. Is this a good direction?
Upvotes: 0
Views: 153
Reputation: 32386
Yes, You can access the field value from _source
if you want to avoid the call to SQL, and better performance. And yes, IMO it's a good direction if you are thinking to call SQL just for retrieving these field values. fetching values from ES will be more efficient.
You can and should disable the index option on the field, where you don't need to search.
Also, refer to source filtering for more information.
Upvotes: 1