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

Peter Keegan commented on SOLR-5536:
------------------------------------

Hi Joel,

The patch worked fine with 4.6.1 after I removed the 'bad' lines (Eclipse patch 
tool is rather fussy):

$ diff SOLR-5536.patch  SOLR-5536-edited.patch
324,331d323
< \ No newline at end of file
<
< Property changes on: 
solr/core/src/java/org/apache/solr/search/function/CollapseScoreFunction.java
< ___________________________________________________________________
< Added: svn:eol-style
< ## -0,0 +1 ##
< +native
< \ No newline at end of property
391,393c383
<      //Test collapse by score with elevation
<
<      params = new ModifiableSolrParams();

Thanks,
Peter


> Add ValueSource collapse criteria to CollapsingQParsingPlugin
> -------------------------------------------------------------
>
>                 Key: SOLR-5536
>                 URL: https://issues.apache.org/jira/browse/SOLR-5536
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>    Affects Versions: 4.6
>            Reporter: Joel Bernstein
>            Assignee: Joel Bernstein
>            Priority: Minor
>             Fix For: 4.7, 5.0
>
>         Attachments: SOLR-5536-edited.patch, SOLR-5536.patch, 
> SOLR-5536.patch, SOLR-5536.patch, SOLR-5536.patch
>
>
> It would be useful for the CollapsingQParserPlugin to support ValueSource 
> collapse criteria.
> Proposed syntax:
> {code}
> fq={!collapse field=collapse_field max=value_source}
> {code}
> This ticket will also introduce a function query called "cscore",  which will 
> return the score of the current document being collapsed. This will allow 
> score to be incorporated into collapse criteria functions.
> A simple example of the cscore usage:
> {code}
> fq={!collapse field=collapse_field max=sum(cscore(), field(x))}
> {code}
>  



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to