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 "Thomas Mueller (JIRA)" <ji...@apache.org> on 2017/07/11 13:52:00 UTC

[jira] [Commented] (OAK-5899) PropertyDefinitions should allow for some tweakability to declare usefulness

    [ https://issues.apache.org/jira/browse/OAK-5899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16082219#comment-16082219 ] 

Thomas Mueller commented on OAK-5899:
-------------------------------------

@Chetan the definition of costPerEntry in QueryIndex.IndexPlan is:

        /**
         * The cost to read one entry from the cursor. The returned value should
         * approximately match the number of disk read operations plus the
         * number of network roundtrips (worst case).
         * 
         * @return the lookup cost per entry, in estimated number of I/O operations
         */

To me it looks like this doesn't match what the Lucene index does:

{noformat}
 //For plan2 as 2 props are indexed its costPerEntry should be less than plan1 which
+        //indexes only one prop
+        assertThat(plan2.getCostPerEntry(), lessThan(plan1.getCostPerEntry()));
+
{noformat}

I would rather modify estimatedEntryCount:

        /**
         * The estimated number of entries in the cursor that is returned by the query method,
         * when using this plan. This value does not have to be accurate.
         * 
         * @return the estimated number of entries
         */
        long getEstimatedEntryCount();


> PropertyDefinitions should allow for some tweakability to declare usefulness
> ----------------------------------------------------------------------------
>
>                 Key: OAK-5899
>                 URL: https://issues.apache.org/jira/browse/OAK-5899
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: lucene
>            Reporter: Vikas Saurabh
>            Assignee: Chetan Mehrotra
>            Priority: Blocker
>             Fix For: 1.8, 1.6.3
>
>         Attachments: OAK-5899-v1.patch
>
>
> At times, we have property definitions which are added to support for dense results right out of the index (e.g. {{contains(\*, 'foo') AND \[bar]='baz'}}).
> In such cases, the added property definition "might" not be the best one to answer queries which only have the property restriction (eg only {{\[bar]='baz'}}
> There should be a way for property definition to declare this. May be there are cases of some spectrum too - i.e. not only a boolean-usable-or-not, but some kind of scale of how-usable is it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)