Description
In case of suggestions and spellcheck i.e. native queries. The cost evaluation for using index comes out to be 2.0 which is smaller than even minimum cost of the indexes.
This leads to non-evaluation of further index types. In this case elastic.
Minimum cost for indexes are as follows:
Index Type | min cost |
---|---|
reference index | 1.0 |
property index | 2.0 |
nodetype | 2.05 |
luceneproperty index | 2.1 |
elastic index: | 2.2 |
Lucene Aggregate Index | 2.2 |
Solr Aggegate Index | 2.3 |
Formulation for cost evaluation is :
double c = p.getCostPerExecution() + entryCount * p.getCostPerEntry();
Which for native queries is equivalent to 1.0 + 1.0 * 1.0 i.e 2.0.
So make sure that index evaluation is not stopped at lucene indexes we are going to change EstimatedEntryCount to 2 from 1 which will return cost for suggestions and spellcheck as 3.0
Attachments
Issue Links
- relates to
-
OAK-9419 Lower the minimum cost for elastic index
- Closed
- links to