[jira] [Commented] (LUCENE-7623) Add FunctionScoreQuery and FunctionMatchQuery
[ https://issues.apache.org/jira/browse/LUCENE-7623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16059551#comment-16059551 ] David Smiley commented on LUCENE-7623: -- I'm a little surprised to see these additions in the Lucene queries module because I thought there was an overarching intent to bring the functionality of ValueSource's into Lucene core. Ramification: Now in LUCENE-7737 I think I see a case where spatial-extras PointVectorStrategy is adding a bunch more code that could be avoided if FunctionMatchQuery were in core. Note that the Solr legacy copy of PointVectorStrategy in LUCENE-7737 is able to simply use FunctionMatchQuery. > Add FunctionScoreQuery and FunctionMatchQuery > - > > Key: LUCENE-7623 > URL: https://issues.apache.org/jira/browse/LUCENE-7623 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Alan Woodward >Assignee: Alan Woodward >Priority: Minor > Fix For: 6.5 > > Attachments: LUCENE-7623.patch, LUCENE-7623.patch, LUCENE-7623.patch, > LUCENE-7623.patch, LUCENE-7623.patch, LUCENE-7623.patch > > > We should update the various function scoring queries to use the new > DoubleValues API -- 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-7623) Add FunctionScoreQuery and FunctionMatchQuery
[ https://issues.apache.org/jira/browse/LUCENE-7623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15823828#comment-15823828 ] ASF subversion and git services commented on LUCENE-7623: - Commit 85ae5de7032ca4511d598a68961864bcfc75caa2 in lucene-solr's branch refs/heads/branch_6x from [~romseygeek] [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=85ae5de ] LUCENE-7623: Add FunctionMatchQuery and FunctionScoreQuery > Add FunctionScoreQuery and FunctionMatchQuery > - > > Key: LUCENE-7623 > URL: https://issues.apache.org/jira/browse/LUCENE-7623 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Alan Woodward >Assignee: Alan Woodward >Priority: Minor > Attachments: LUCENE-7623.patch, LUCENE-7623.patch, LUCENE-7623.patch, > LUCENE-7623.patch, LUCENE-7623.patch, LUCENE-7623.patch > > > We should update the various function scoring queries to use the new > DoubleValues API -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-7623) Add FunctionScoreQuery and FunctionMatchQuery
[ https://issues.apache.org/jira/browse/LUCENE-7623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15823829#comment-15823829 ] ASF subversion and git services commented on LUCENE-7623: - Commit fc2e0fd13324699fe1ddb15bb09960a8501f52f5 in lucene-solr's branch refs/heads/master from [~romseygeek] [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=fc2e0fd ] LUCENE-7623: Add FunctionMatchQuery and FunctionScoreQuery > Add FunctionScoreQuery and FunctionMatchQuery > - > > Key: LUCENE-7623 > URL: https://issues.apache.org/jira/browse/LUCENE-7623 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Alan Woodward >Assignee: Alan Woodward >Priority: Minor > Attachments: LUCENE-7623.patch, LUCENE-7623.patch, LUCENE-7623.patch, > LUCENE-7623.patch, LUCENE-7623.patch, LUCENE-7623.patch > > > We should update the various function scoring queries to use the new > DoubleValues API -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-7623) Add FunctionScoreQuery and FunctionMatchQuery
[ https://issues.apache.org/jira/browse/LUCENE-7623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15823730#comment-15823730 ] Adrien Grand commented on LUCENE-7623: -- +1 > Add FunctionScoreQuery and FunctionMatchQuery > - > > Key: LUCENE-7623 > URL: https://issues.apache.org/jira/browse/LUCENE-7623 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Alan Woodward >Assignee: Alan Woodward >Priority: Minor > Attachments: LUCENE-7623.patch, LUCENE-7623.patch, LUCENE-7623.patch, > LUCENE-7623.patch, LUCENE-7623.patch, LUCENE-7623.patch > > > We should update the various function scoring queries to use the new > DoubleValues API -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-7623) Add FunctionScoreQuery and FunctionMatchQuery
[ https://issues.apache.org/jira/browse/LUCENE-7623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15823660#comment-15823660 ] Adrien Grand commented on LUCENE-7623: -- Thanks Alan, I just have some minor comments now, +1 otherwise! - Let's use {{DoubleUnaryOperator}} rather than {{DoubleFunction}} and {{ToDoubleBiFunction}} rather tan {{BiFunction }} - Let's make {{FunctionMatchQuery}} and {{FunctionScoreQuery}} final - In {{FunctionScoreQuery}}, I think we should only ask for scores on the wrapped weight if the values source needs scores, ie. {{Weight inner = in.createWeight(searcher, needsScores && valuesSource.needsScores(), 1f);}} - I think the tests could be improved by checking TopDocs.totalHits too? Otherwise we might miss cases when the top docs are the same but one query yields more results? > Add FunctionScoreQuery and FunctionMatchQuery > - > > Key: LUCENE-7623 > URL: https://issues.apache.org/jira/browse/LUCENE-7623 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Alan Woodward >Assignee: Alan Woodward >Priority: Minor > Attachments: LUCENE-7623.patch, LUCENE-7623.patch, LUCENE-7623.patch, > LUCENE-7623.patch, LUCENE-7623.patch > > > We should update the various function scoring queries to use the new > DoubleValues API -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-7623) Add FunctionScoreQuery and FunctionMatchQuery
[ https://issues.apache.org/jira/browse/LUCENE-7623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15823152#comment-15823152 ] Adrien Grand commented on LUCENE-7623: -- Did you upload an old patch? It does not seem to have the changes you mentioned. > Add FunctionScoreQuery and FunctionMatchQuery > - > > Key: LUCENE-7623 > URL: https://issues.apache.org/jira/browse/LUCENE-7623 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Alan Woodward >Assignee: Alan Woodward >Priority: Minor > Attachments: LUCENE-7623.patch, LUCENE-7623.patch, LUCENE-7623.patch, > LUCENE-7623.patch > > > We should update the various function scoring queries to use the new > DoubleValues API -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-7623) Add FunctionScoreQuery and FunctionMatchQuery
[ https://issues.apache.org/jira/browse/LUCENE-7623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15822952#comment-15822952 ] Adrien Grand commented on LUCENE-7623: -- I like this functionality, here are some comments: - Why did you add a new {{forSearcher}} method, there does not seem to be any useful implementation of it? - I think it can be problematic to call {{doubleValue()}} from {{toString()}} since {{doubleValue()}} requires that the values source be positioned while {{toString()}} may be called anytime. - Why do the new tests depend on the expressions module? I would rather like to have custom values sources in the test class than adding this new dependency. - Let's use {{DoublePredicate}} rather than {{Predicate}}? - Let's maybe add a TODO around the cost impl of {{FunctionMatchQuery}} about whether values sources should be able to give this information. - Maybe FunctionScoreWeight should cast to double _after_ the multiplication with the boost in order to reduce the accuracy loss? - Can we not use the {{@Test}} annotation, like in lucene/core? > Add FunctionScoreQuery and FunctionMatchQuery > - > > Key: LUCENE-7623 > URL: https://issues.apache.org/jira/browse/LUCENE-7623 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Alan Woodward >Assignee: Alan Woodward >Priority: Minor > Attachments: LUCENE-7623.patch, LUCENE-7623.patch, LUCENE-7623.patch > > > We should update the various function scoring queries to use the new > DoubleValues API -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-7623) Add FunctionScoreQuery and FunctionMatchQuery
[ https://issues.apache.org/jira/browse/LUCENE-7623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15817100#comment-15817100 ] David Smiley commented on LUCENE-7623: -- Looks alright but I didn't review thoroughly. I noticed one problem: {{TwoPhaseIterator.matchCost}} as implemented here isn't right. It's supposed to be the match cost for a _single document_, thus returning maxDocs is definitely not the right response. See the javadocs. Unfortunately since DoubleValueSource has no similar cost, you can't propagate... so might as well return some constant. Judging from existing impls... anywhere between 10 and 100 is good to me. > Add FunctionScoreQuery and FunctionMatchQuery > - > > Key: LUCENE-7623 > URL: https://issues.apache.org/jira/browse/LUCENE-7623 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Alan Woodward >Assignee: Alan Woodward >Priority: Minor > Attachments: LUCENE-7623.patch, LUCENE-7623.patch > > > We should update the various function scoring queries to use the new > DoubleValues API -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org