2 ms·
I still don't understand why lucene can't use the original document for aggregations ? I undestand that it will be slower if the field isn't indexed, but it sho
by ddorian43 11y ago
I still don't understand why lucene can't use the original document for aggregations ? I undestand that it will be slower if the field isn't indexed, but it should be doable like rdbms do.
- boomzilla 11y agoIt can, as long as you store all the fields that will be needed for aggregation. Stored, non-indexed field retrieval can be slow as it might involve a lot of random seeks, so it might be slower than relation dbs. What use case do you have in mind?
- ddorian43 11y agoI mean in the case of _source field that elasticsearc uses. But seems that is separate. My usecase is I want to do querying+filtering on all fields of the document. In this case you have to: 1.store the field or document so you can get back the value (ex: when querying the document) 2.index the field for filtering 3.separately index the field for aggregation(doc_values) While in rdbms you only need(1).