You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Mohit Kataria (Jira)" <ji...@apache.org> on 2021/07/15 05:36:00 UTC

[jira] [Resolved] (OAK-9457) Lucene index is always used over ES index when the cost is minimal

     [ https://issues.apache.org/jira/browse/OAK-9457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mohit Kataria resolved OAK-9457.
--------------------------------
    Fix Version/s: 1.42.0
       Resolution: Fixed

> 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
>             Fix For: 1.42.0
>
>
> 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
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)