[jira] [Commented] (LUCENE-8042) Add SegmentCachable interface

2017-11-10 Thread David Smiley (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-8042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16247995#comment-16247995
 ] 

David Smiley commented on LUCENE-8042:
--

Really nice!

> Add SegmentCachable interface
> -
>
> Key: LUCENE-8042
> URL: https://issues.apache.org/jira/browse/LUCENE-8042
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
> Fix For: 7.2
>
> Attachments: LUCENE-8042.patch, LUCENE-8042.patch, LUCENE-8042.patch, 
> LUCENE-8042.patch
>
>
> Following LUCENE-8017, I tried to add a getCacheHelper(LeafReaderContext) 
> method to DoubleValuesSource so that Weights that use DVS can delegate on.  
> This ended up with the same method being added to LongValuesSource, and some 
> of the similar objects in spatial-extras.  I think it makes sense to abstract 
> this out into a separate SegmentCachable interface.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-8042) Add SegmentCachable interface

2017-11-10 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-8042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16247808#comment-16247808
 ] 

ASF subversion and git services commented on LUCENE-8042:
-

Commit 317c9f359f3779725324fdb546fbb2ebe7fcf54c in lucene-solr's branch 
refs/heads/branch_7x from [~romseygeek]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=317c9f3 ]

LUCENE-8042: Fix precommit and CHANGES


> Add SegmentCachable interface
> -
>
> Key: LUCENE-8042
> URL: https://issues.apache.org/jira/browse/LUCENE-8042
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
> Attachments: LUCENE-8042.patch, LUCENE-8042.patch, LUCENE-8042.patch, 
> LUCENE-8042.patch
>
>
> Following LUCENE-8017, I tried to add a getCacheHelper(LeafReaderContext) 
> method to DoubleValuesSource so that Weights that use DVS can delegate on.  
> This ended up with the same method being added to LongValuesSource, and some 
> of the similar objects in spatial-extras.  I think it makes sense to abstract 
> this out into a separate SegmentCachable interface.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-8042) Add SegmentCachable interface

2017-11-10 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-8042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16247810#comment-16247810
 ] 

ASF subversion and git services commented on LUCENE-8042:
-

Commit b5571031cab9199d7a74370f69d821f4676e2caa in lucene-solr's branch 
refs/heads/master from [~romseygeek]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=b557103 ]

LUCENE-8042: Fix precommit and CHANGES


> Add SegmentCachable interface
> -
>
> Key: LUCENE-8042
> URL: https://issues.apache.org/jira/browse/LUCENE-8042
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
> Attachments: LUCENE-8042.patch, LUCENE-8042.patch, LUCENE-8042.patch, 
> LUCENE-8042.patch
>
>
> Following LUCENE-8017, I tried to add a getCacheHelper(LeafReaderContext) 
> method to DoubleValuesSource so that Weights that use DVS can delegate on.  
> This ended up with the same method being added to LongValuesSource, and some 
> of the similar objects in spatial-extras.  I think it makes sense to abstract 
> this out into a separate SegmentCachable interface.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-8042) Add SegmentCachable interface

2017-11-10 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-8042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16247809#comment-16247809
 ] 

ASF subversion and git services commented on LUCENE-8042:
-

Commit 276e317e9424252d89df7596851c7cd3559d79b1 in lucene-solr's branch 
refs/heads/master from [~romseygeek]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=276e317 ]

LUCENE-8042: Add SegmentCachable interface


> Add SegmentCachable interface
> -
>
> Key: LUCENE-8042
> URL: https://issues.apache.org/jira/browse/LUCENE-8042
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
> Attachments: LUCENE-8042.patch, LUCENE-8042.patch, LUCENE-8042.patch, 
> LUCENE-8042.patch
>
>
> Following LUCENE-8017, I tried to add a getCacheHelper(LeafReaderContext) 
> method to DoubleValuesSource so that Weights that use DVS can delegate on.  
> This ended up with the same method being added to LongValuesSource, and some 
> of the similar objects in spatial-extras.  I think it makes sense to abstract 
> this out into a separate SegmentCachable interface.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-8042) Add SegmentCachable interface

2017-11-10 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-8042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16247807#comment-16247807
 ] 

ASF subversion and git services commented on LUCENE-8042:
-

Commit 6e4f9a62e7cc221dcb49788ab683c87f764f2f4a in lucene-solr's branch 
refs/heads/branch_7x from [~romseygeek]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=6e4f9a6 ]

LUCENE-8042: Add SegmentCachable interface


> Add SegmentCachable interface
> -
>
> Key: LUCENE-8042
> URL: https://issues.apache.org/jira/browse/LUCENE-8042
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
> Attachments: LUCENE-8042.patch, LUCENE-8042.patch, LUCENE-8042.patch, 
> LUCENE-8042.patch
>
>
> Following LUCENE-8017, I tried to add a getCacheHelper(LeafReaderContext) 
> method to DoubleValuesSource so that Weights that use DVS can delegate on.  
> This ended up with the same method being added to LongValuesSource, and some 
> of the similar objects in spatial-extras.  I think it makes sense to abstract 
> this out into a separate SegmentCachable interface.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-8042) Add SegmentCachable interface

2017-11-10 Thread Robert Muir (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-8042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16247602#comment-16247602
 ] 

Robert Muir commented on LUCENE-8042:
-

+1, this really looks a lot better to me.

> Add SegmentCachable interface
> -
>
> Key: LUCENE-8042
> URL: https://issues.apache.org/jira/browse/LUCENE-8042
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
> Attachments: LUCENE-8042.patch, LUCENE-8042.patch, LUCENE-8042.patch, 
> LUCENE-8042.patch
>
>
> Following LUCENE-8017, I tried to add a getCacheHelper(LeafReaderContext) 
> method to DoubleValuesSource so that Weights that use DVS can delegate on.  
> This ended up with the same method being added to LongValuesSource, and some 
> of the similar objects in spatial-extras.  I think it makes sense to abstract 
> this out into a separate SegmentCachable interface.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-8042) Add SegmentCachable interface

2017-11-10 Thread Alan Woodward (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-8042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16247328#comment-16247328
 ] 

Alan Woodward commented on LUCENE-8042:
---

[~rcmuir] are you happy with the last patch?

> Add SegmentCachable interface
> -
>
> Key: LUCENE-8042
> URL: https://issues.apache.org/jira/browse/LUCENE-8042
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
> Attachments: LUCENE-8042.patch, LUCENE-8042.patch, LUCENE-8042.patch, 
> LUCENE-8042.patch
>
>
> Following LUCENE-8017, I tried to add a getCacheHelper(LeafReaderContext) 
> method to DoubleValuesSource so that Weights that use DVS can delegate on.  
> This ended up with the same method being added to LongValuesSource, and some 
> of the similar objects in spatial-extras.  I think it makes sense to abstract 
> this out into a separate SegmentCachable interface.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-8042) Add SegmentCachable interface

2017-11-08 Thread Robert Muir (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-8042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16244028#comment-16244028
 ] 

Robert Muir commented on LUCENE-8042:
-

Also i would still like to see if we can make this simply a boolean method, 
isCacheable.

I am concerned that API decisions are being made on broken assumptions (eg. 
LUCENE-8017).  Such function queries that depend on the documents score can 
never be cached, ever, because they users can override *statistics methods in 
IndexSearcher and implement distributed search, or feed numbers from a random 
number generator, or whatever the hell they want. So it is actually false that 
such queries depend on the whole index, they are simply unsafe to cache.

So, I'd like to put an end to the theoretical discussion of top-level caching 
here, right now, and make the api minimal and something we can live with.

> Add SegmentCachable interface
> -
>
> Key: LUCENE-8042
> URL: https://issues.apache.org/jira/browse/LUCENE-8042
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
> Attachments: LUCENE-8042.patch, LUCENE-8042.patch, LUCENE-8042.patch
>
>
> Following LUCENE-8017, I tried to add a getCacheHelper(LeafReaderContext) 
> method to DoubleValuesSource so that Weights that use DVS can delegate on.  
> This ended up with the same method being added to LongValuesSource, and some 
> of the similar objects in spatial-extras.  I think it makes sense to abstract 
> this out into a separate SegmentCachable interface.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-8042) Add SegmentCachable interface

2017-11-08 Thread Robert Muir (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-8042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16244024#comment-16244024
 ] 

Robert Muir commented on LUCENE-8042:
-

some of the code in this patch still uses SegmentCacheable, so i have trouble 
reviewing. I think these are just leftovers?


> Add SegmentCachable interface
> -
>
> Key: LUCENE-8042
> URL: https://issues.apache.org/jira/browse/LUCENE-8042
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
> Attachments: LUCENE-8042.patch, LUCENE-8042.patch, LUCENE-8042.patch
>
>
> Following LUCENE-8017, I tried to add a getCacheHelper(LeafReaderContext) 
> method to DoubleValuesSource so that Weights that use DVS can delegate on.  
> This ended up with the same method being added to LongValuesSource, and some 
> of the similar objects in spatial-extras.  I think it makes sense to abstract 
> this out into a separate SegmentCachable interface.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-8042) Add SegmentCachable interface

2017-11-08 Thread Alan Woodward (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-8042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16243557#comment-16243557
 ] 

Alan Woodward commented on LUCENE-8042:
---

For reference, the method quoted above would now look like this:
{code}
 @Override
public CacheLevel getCacheLevel() {
  return SegmentCachable.DOCVALUES(field);
}
{code}

> Add SegmentCachable interface
> -
>
> Key: LUCENE-8042
> URL: https://issues.apache.org/jira/browse/LUCENE-8042
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
> Attachments: LUCENE-8042.patch, LUCENE-8042.patch
>
>
> Following LUCENE-8017, I tried to add a getCacheHelper(LeafReaderContext) 
> method to DoubleValuesSource so that Weights that use DVS can delegate on.  
> This ended up with the same method being added to LongValuesSource, and some 
> of the similar objects in spatial-extras.  I think it makes sense to abstract 
> this out into a separate SegmentCachable interface.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-8042) Add SegmentCachable interface

2017-11-07 Thread Robert Muir (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-8042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16241882#comment-16241882
 ] 

Robert Muir commented on LUCENE-8042:
-

Can we reconsider the latter?

This is a bit too much indirection and abstractions IMO for something that's 
essentially a boolean method returning {{fi.dvGen == -1}}:

{code}
   @Override
   public IndexReader.CacheHelper getCacheHelper(LeafReaderContext context) 
{
  return SegmentCachable.getDocValuesCacheHelper(field, context);
   }
{code}

Given that this is an abstract method (required) on Weight, and given that we 
can *only cache per-segment*, can we please simplify it?

> Add SegmentCachable interface
> -
>
> Key: LUCENE-8042
> URL: https://issues.apache.org/jira/browse/LUCENE-8042
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
> Attachments: LUCENE-8042.patch
>
>
> Following LUCENE-8017, I tried to add a getCacheHelper(LeafReaderContext) 
> method to DoubleValuesSource so that Weights that use DVS can delegate on.  
> This ended up with the same method being added to LongValuesSource, and some 
> of the similar objects in spatial-extras.  I think it makes sense to abstract 
> this out into a separate SegmentCachable interface.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org