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

Alessandro Benedetti commented on SOLR-11386:
---------------------------------------------

So :
1) I tried to build a test from your examples and I can not reproduce the issue 
:
org.apache.solr.ltr.feature.TestExternalFeatures
{code:java}
@Test
  public void featureExtraction_multiTermEfi_shouldScoreFeature() throws 
Exception {
    final SolrQuery query = new SolrQuery();
    query.setQuery("*:*");
    query.add("rows", "1");

    final String docs0fv_csv = FeatureLoggerTestUtils.toFeatureVector(
        "occurrences","2.3", "originalScore","1.0");

    query.remove("fl");
    query.add("fl", "score,fvalias:[fv store=fstore3 efi.myOcc=2.3]");
    query.add("rq", "{!ltr reRankDocs=10 model=externalmodel efi.user_query='w1 
w2 w3' efi.myOcc=2.3}");
    assertJQ("/query" + query.toQueryString(), 
"/response/docs/[0]/fvalias=='"+docs0fv_csv+"'");

  }
{code}

I set a breakpoint at org/apache/solr/ltr/feature/SolrFeature.java:143, and I 
see a proper macro expansion .
Would be great if you can contribute a test like that, that shows the wrong 
behaviour

2) If you want all the clauses of your query to match mandatory, but you don't 
care about the keyword positions your dismax query should do the trick :
The mm parameter speciifes the minimum should match and the default value of mm 
is 100% (meaning that all clauses must match).

> Extracting learning to rank features fails when word ordering of EFI argument 
> changed.
> --------------------------------------------------------------------------------------
>
>                 Key: SOLR-11386
>                 URL: https://issues.apache.org/jira/browse/SOLR-11386
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: contrib - LTR
>    Affects Versions: 6.5.1
>            Reporter: Michael A. Alcorn
>         Attachments: solr_efi_examples.zip
>
>
> I'm getting some extremely strange behavior when trying to extract features 
> for a learning to rank model. The following query incorrectly says all 
> features have zero values:
> {code}
> http://gss-test-fusion.usersys.redhat.com:8983/solr/access/query?q=added 
> couple of fiber channel&rq={!ltr model=redhat_efi_model reRankDocs=1 
> efi.case_summary=the efi.case_description=added couple of fiber channel 
> efi.case_issue=the efi.case_environment=the}&fl=id,score,[features]&rows=10
> {code}
> But this query, which simply moves the word "added" from the front of the 
> provided text to the back, properly fills in the feature values:
> {code}
> http://gss-test-fusion.usersys.redhat.com:8983/solr/access/query?q=couple of 
> fiber channel added&rq={!ltr model=redhat_efi_model reRankDocs=1 
> efi.case_summary=the efi.case_description=couple of fiber channel added 
> efi.case_issue=the efi.case_environment=the}&fl=id,score,[features]&rows=10
> {code}
> The explain output for the failing query can be found here:
> https://gist.github.com/manisnesan/18a8f1804f29b1b62ebfae1211f38cc4
> and the explain output for the properly functioning query can be found here:
> https://gist.github.com/manisnesan/47685a561605e2229434b38aed11cc65



--
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

Reply via email to