For custom analyzer and custom token filters you can check:

https://github.com/VirtoCommerce/vc-module-elastic-search/blob/dev/src/VirtoCommerce.ElasticSearchModule.Data/ElasticSearchProvider.cs#L614


Aggregations and buckets usage can be found here:

https://github.com/VirtoCommerce/vc-module-elastic-search/blob/dev/src/VirtoCommerce.ElasticSearchModule.Data/ElasticSearchRequestBuilder.cs

https://github.com/VirtoCommerce/vc-module-elastic-search/blob/dev/src/VirtoCommerce.ElasticSearchModule.Data/ElasticSearchResponseBuilder.cs