I have 2 types of data within each index, but each type has the same field names because I want to be able to search both types at once on the same field. That being said I also want to be able to search them separatly as the volume of one type is far greater than the other. So I want searches on only the less voluminous type to return quickly where as searches on both or on the more voluminous type will take longer and have more hit.
Unfortunately, Elasticsearch will always index values with the same field name into the same lucene inverted index, whether or not the values come from separate types. Therefore if I search only the smaller type, I will still have to search through all of the data in the index to find my hits.
for example if I have type RARE with fields "user" and "name"
as well as type COMMON with the same field "user" and "name",
then I do a search for only type RARE on field "user", Lucene will still have to search through all the COMMON data to find its hit for type RARE.
I was wondering if the is a way to separate these indices in Lucene without having to change the field name. Or if I can alias a field somehow so I don't actually have to change my query?