[
https://issues.apache.org/jira/browse/OAK-9457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mohit Kataria updated OAK-9457:
-------------------------------
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 index.
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
was:
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 index.
This leads to non-evaluation of further index types. In this case elastic.
> Lucene index is always used over ES index when the cost is minimal
> ------------------------------------------------------------------
>
> Key: OAK-9457
> URL: https://issues.apache.org/jira/browse/OAK-9457
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: indexing
> Affects Versions: 1.40.0
> Reporter: Mohit Kataria
> Assignee: Mohit Kataria
> Priority: Major
>
> 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 index.
> 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
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)