[jira] [Commented] (LUCENE-7736) Expose some IndexReader stats via DoubleValuesSources

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

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

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

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

LUCENE-7736: CoveringQuery needs to rewrite its ValuesSource.


> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Fix For: 7.2
>
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch, LUCENE-7736.patch, 
> LUCENE-7736.patch, LUCENE-7736.patch, LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
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-7736) Expose some IndexReader stats via DoubleValuesSources

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

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

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

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

LUCENE-7736: CoveringQuery needs to rewrite its ValuesSource.


> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Fix For: 7.2
>
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch, LUCENE-7736.patch, 
> LUCENE-7736.patch, LUCENE-7736.patch, LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
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-7736) Expose some IndexReader stats via DoubleValuesSources

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

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

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

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

LUCENE-7736: IndexReaderValues


> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Fix For: 7.2
>
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch, LUCENE-7736.patch, 
> LUCENE-7736.patch, LUCENE-7736.patch, LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
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-7736) Expose some IndexReader stats via DoubleValuesSources

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

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

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

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

LUCENE-7736: CHANGES.txt


> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Fix For: 7.2
>
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch, LUCENE-7736.patch, 
> LUCENE-7736.patch, LUCENE-7736.patch, LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
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-7736) Expose some IndexReader stats via DoubleValuesSources

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

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

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

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

LUCENE-7736: CHANGES.txt


> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch, LUCENE-7736.patch, 
> LUCENE-7736.patch, LUCENE-7736.patch, LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
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-7736) Expose some IndexReader stats via DoubleValuesSources

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

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

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

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

LUCENE-7736: IndexReaderValues


> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch, LUCENE-7736.patch, 
> LUCENE-7736.patch, LUCENE-7736.patch, LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
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-7736) Expose some IndexReader stats via DoubleValuesSources

2017-10-19 Thread Alan Woodward (JIRA)

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

Alan Woodward commented on LUCENE-7736:
---

In fact, should all of these just always return false from equals() in order to 
prevent them being cached and reused incorrectly?

> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch, LUCENE-7736.patch, 
> LUCENE-7736.patch, LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
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-7736) Expose some IndexReader stats via DoubleValuesSources

2017-10-19 Thread Alan Woodward (JIRA)

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

Alan Woodward commented on LUCENE-7736:
---

bq. I think it's important for equals to behave correctly and never return true 
for values sources that could return different values.

Ah, I see what you mean - if we had a FunctionMatchQuery that was cached across 
multiple IndexSearcher reopens it would potentially return the wrong values, 
because the underlying DoubleValues defined by the top-level index readers.  
I'll change things back again.

bq. I think you forgot to update FunctionMatchQuery

I did, thanks for picking it up...

> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch, LUCENE-7736.patch, 
> LUCENE-7736.patch, LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
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-7736) Expose some IndexReader stats via DoubleValuesSources

2017-10-19 Thread Adrien Grand (JIRA)

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

Adrien Grand commented on LUCENE-7736:
--

Your point about using the description for equals is correct, but I still find 
it fragile. I think it's important for equals to behave correctly and never 
return true for values sources that could return different values.

Looking again at the patch, I think you forgot to update FunctionMatchQuery to 
make it rewrite the values source?

bq. I really dislike the 'rewrite until things stay the same' API on Query...

Let's open an issue about fixing it?

> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch, LUCENE-7736.patch, 
> LUCENE-7736.patch, LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
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-7736) Expose some IndexReader stats via DoubleValuesSources

2017-10-19 Thread Alan Woodward (JIRA)

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

Alan Woodward commented on LUCENE-7736:
---

bq. two instances that have been built on a different reader will be considered 
equals

This is true, but there aren't really any circumstances under which it would 
happen.  Comparison for equality is done when building queries or sorts, and 
these are indexreader independent.  It's only after a rewrite that the values 
would actually be different, and the only callers of rewrite are internal 
lucene classes.  It would be nice to enforce this somehow by making rewrite() 
protected, but unfortunately I think it's called from different 
packages/modules so this won't work.

bq. Should we use == rather than equals

Will do.

bq. Did you remove the if (boost == 1f) return expl; from FunctionScoreQuery on 
purpose?

Yes; just returning the straight DVS explanation breaks things when the overall 
query matches, but the value source has no value - we end up returning 
Explanation.noMatch() from a document that matches, but has a zero score.

re TermFreqDoubleValuesSource that's a nice idea, I'll add a DoubleValues.EMPTY 
instance and use that.

bq. rewriting only once is enough

Yes!  Perhaps I should add some javadoc making that explicit.  I really dislike 
the 'rewrite until things stay the same' API on Query...


> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch, LUCENE-7736.patch, 
> LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
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-7736) Expose some IndexReader stats via DoubleValuesSources

2017-10-18 Thread Adrien Grand (JIRA)

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

Adrien Grand commented on LUCENE-7736:
--

Thanks Alan. I think those new functions are going to be useful.

bq. One wrinkle here is that we can't compare closures, so 
IndexReaderDoubleValuesSource only uses its description field for comparisons. 
These are all private implementations, and there's a comment to that effect, so 
I think this is OK.

I think this is incorrect as two instances that have been built on a different 
reader will be considered equals even though they produce different values? 
Let's pass things that are actually comparable to 
{{IndexReaderDoubleValuesSource}} or just live with the fact that two instances 
that do the same thing are considered unequal (which is ok imo as long as 
a.equals(b) returns true if a == b)?

Should we use == rather than equals to know whether the source was rewritten? I 
don't like one more than the other but since queries already use == I'd rather 
like things to be consistent?

Did you remove the {{if (boost == 1f) return expl;}} from 
{{FunctionScoreQuery}} on purpose? I know it is not necessary for correctness 
but I still like the fact that it makes the explanation easier to read in the 
default case that the boost is 1.

In {{TermFreqDoubleValuesSource}} could we just return an empty instance if the 
term is not found instead of having to do a null check for every document?

In 
{{lucene/queries/src/java/org/apache/lucene/queries/function/ValueSource.java}} 
you seem to be assuming that rewriting only once is enough? Is it true?



> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch, LUCENE-7736.patch, 
> LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
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-7736) Expose some IndexReader stats via DoubleValuesSources

2017-04-11 Thread Uwe Schindler (JIRA)

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

Uwe Schindler commented on LUCENE-7736:
---

Also add {{@FunctionalInterface}} to {{ReaderFunction}} interface for 
consistency! :-)

> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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



[jira] [Commented] (LUCENE-7736) Expose some IndexReader stats via DoubleValuesSources

2017-04-11 Thread Uwe Schindler (JIRA)

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

Uwe Schindler commented on LUCENE-7736:
---

Sorry, those methods are global (on IndexReader, so also composites). So 
LeafReader is the wrong place. Nuke my comment.

Nevertheless the {{IndexReaderFunctions}} class should be final and have 
private ctor.

> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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



[jira] [Commented] (LUCENE-7736) Expose some IndexReader stats via DoubleValuesSources

2017-04-11 Thread Uwe Schindler (JIRA)

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

Uwe Schindler commented on LUCENE-7736:
---

I was thinking about this: Why do we need a static-method-only helper class 
(that should have a private constructor, please!)? Would it not be possible to 
add these methods as default impls to LeafReader? I have not looked into the 
details, but this looks more easy to understand. I agree the current code can 
be separate from core, but once we move to core, I'd add that to the 
LeafReaders.

> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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



[jira] [Commented] (LUCENE-7736) Expose some IndexReader stats via DoubleValuesSources

2017-04-11 Thread Adrien Grand (JIRA)

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

Adrien Grand commented on LUCENE-7736:
--

bq. So have an AssertingDoubleValuesSource? I like that idea, although I'm not 
sure where it would get injected into the tests.

It is indeed harder than with eg. AssertingWeight. I guess one option would be 
to unwrap instances of {{FunctionScoreQuery}} and {{FunctionMatchQuery}} in 
{{AssertingIndexSearcher.rewrite}} to replace the values source with an 
asserting instance. However, I can't think of an easy way to do something 
similar when values sources are used for eg. sorting. Another option would be 
to put those assertions directly into existing implementations.

> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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



[jira] [Commented] (LUCENE-7736) Expose some IndexReader stats via DoubleValuesSources

2017-04-11 Thread Adrien Grand (JIRA)

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

Adrien Grand commented on LUCENE-7736:
--

I think it makes sense for these values sources to return doubles natively as 
their main use-case is to be used for scoring, which needs to produce floats?

> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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



[jira] [Commented] (LUCENE-7736) Expose some IndexReader stats via DoubleValuesSources

2017-04-11 Thread Alan Woodward (JIRA)

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

Alan Woodward commented on LUCENE-7736:
---

bq. I'm wondering whether we should try to detect double rewrite

So have an AssertingDoubleValuesSource?  I like that idea, although I'm not 
sure where it would get injected into the tests.

bq. wouldn't LongValueSource be more fitting/appropriate?

DoubleValuesSource is used in more places though (FunctionScoreQuery, 
Expressions module), so I think it's more useable this way.  I guess I see 
LongValuesSource as a convenience wrapper, and DoubleValuesSource as the core 
API.

> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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



[jira] [Commented] (LUCENE-7736) Expose some IndexReader stats via DoubleValuesSources

2017-04-10 Thread David Smiley (JIRA)

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

David Smiley commented on LUCENE-7736:
--

bq.  all int-valued IndexReader methods now return a DoubleValuesSource, as an 
int can fit into a double with no loss of precision

It's all well and good that there is no loss of precision but if the data is a 
whole number then wouldn't LongValueSource be more fitting/appropriate?

> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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



[jira] [Commented] (LUCENE-7736) Expose some IndexReader stats via DoubleValuesSources

2017-04-10 Thread Adrien Grand (JIRA)

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

Adrien Grand commented on LUCENE-7736:
--

Looking at how rewrite is handled again, I'm wondering whether we should try to 
detect double rewrite, which is most likely a usage bug?

> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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



[jira] [Commented] (LUCENE-7736) Expose some IndexReader stats via DoubleValuesSources

2017-04-10 Thread Adrien Grand (JIRA)

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

Adrien Grand commented on LUCENE-7736:
--

+1

> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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



[jira] [Commented] (LUCENE-7736) Expose some IndexReader stats via DoubleValuesSources

2017-04-10 Thread Adrien Grand (JIRA)

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

Adrien Grand commented on LUCENE-7736:
--

+1

> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Attachments: LUCENE-7736.patch, LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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



[jira] [Commented] (LUCENE-7736) Expose some IndexReader stats via DoubleValuesSources

2017-03-10 Thread Adrien Grand (JIRA)

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

Adrien Grand commented on LUCENE-7736:
--

I like the termFreq and reader constant values sources, I can imagine them to 
be useful to users. Can you add equals/methods to these new impls 
(LUCENE-7723)? (I'm thinking that one easy way to make equals/hashcode work for 
them could be to simply make them singletons)

bq. DoubleValuesSource (or LongValuesSource, in the case of norms)

Why are only norms a LongValuesSource? Should termFreq, docFreq, maxDoc and 
numDocs be longs as well?

I'm curious whether you have a use-case for the {{joinDocFreq}} values sources, 
it looks very expensive and a bit esoteric to me. I'm also unsure how useful 
exposing raw norms is given that the value is an implementation detail of the 
similarity?

bq. The IndexReaderFunctions class is currently in the queries module, but it 
could easily be in core instead.

+1 to keep in queries for now

> Expose some IndexReader stats via DoubleValuesSources
> -
>
> Key: LUCENE-7736
> URL: https://issues.apache.org/jira/browse/LUCENE-7736
> Project: Lucene - Core
>  Issue Type: New Feature
>Reporter: Alan Woodward
>Assignee: Alan Woodward
>Priority: Minor
> Attachments: LUCENE-7736.patch
>
>
> We have a number of ValueSource implementations that expose IndexReader stats 
> (numDocs, termFreq, etc).  We should re-implement these as 
> DoubleValuesSources, allowing them to be used in FunctionScoreQuery, etc.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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