Best way to aggregate terms from a text field with type text

I'm using Elasticsearch to hold descriptions of products I get from scraping sites. I have a description field in my index to hold the data and it's of type "text" because I want to search in those fields. Now, I find myself wanting to use aggs on that field as well but I have a large dataset so using fielddata isn't an option. Basically I want to search for "refrigerator" and get back an aggregation of how many descriptions have "freezer". That's a contrived example, but it works for what I want. What is the best way to do this?


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.