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

Gus Heck commented on SOLR-14787:
---------------------------------

Hmm now I suspect my IDE had somehow got confused WRT 9.0 match version or 
perhaps I was reading a wrong window, but trying fresh today  I just reproduced 
the NOUN VERB failure again with a freshly started IDE but this time failing 
with the appropriate 8.7 match version messages... 

That said, but the build still passes when I do this
{code:java}
gus@ns-l1:~/projects/apache/lucene-solr/fork/lucene-solr8$ ant test 
-Dtests.class=org.apache.solr.search.TestPayloadCheckQParserPlugin > 
build.out.txt
gus@ns-l1:~/projects/apache/lucene-solr/fork/lucene-solr8$ grep NOUN 
build.out.txt 
   [junit4]   2> 5995 INFO  
(TEST-TestPayloadCheckQParserPlugin.test-seed#[39C6574AF7C1723D]) [     ] 
o.a.s.c.S.Request [collection1]  webapp=null path=null 
params={q={!payload_check+f%3Dvals_dps+payloads%3D'NOUN+VERB'}cat+jumped&fl=*,score&wt=xml}
 hits=1 status=0 QTime=4
   [junit4]   2> 6004 INFO  
(TEST-TestPayloadCheckQParserPlugin.test-seed#[39C6574AF7C1723D]) [     ] 
o.a.s.c.S.Request [collection1]  webapp=null path=null 
params={q={!payload_check+f%3Dvals_dps+payloads%3D'VERB+NOUN'}cat+jumped&fl=*,score&wt=xml}
 hits=0 status=0 QTime=0
{code}
Note the hits=1 above vs hits=0 I get in the ide running of the same test
{code:java}
3618 INFO  (TEST-TestPayloadCheckQParserPlugin.test-seed#[C26FC0AC309214A9]) [  
   ] o.a.s.c.S.Request [collection1]  webapp=null path=null 
params={q={!payload_check+f%3Dvals_dps+payloads%3D'NOUN+VERB'}cat+jumped&fl=*,score&wt=xml}
 hits=0 status=0 QTime=2
{code}

> Inequality support in Payload Check query parser
> ------------------------------------------------
>
>                 Key: SOLR-14787
>                 URL: https://issues.apache.org/jira/browse/SOLR-14787
>             Project: Solr
>          Issue Type: New Feature
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Kevin Watters
>            Assignee: Gus Heck
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The goal of this ticket/pull request is to support a richer set of matching 
> and filtering based on term payloads.  This patch extends the 
> PayloadCheckQueryParser to add a new local param for "op"
> The value of OP could be one of the following
>  * gt - greater than
>  * gte - greater than or equal
>  * lt - less than
>  * lte - less than or equal
> default value for "op" if not specified is to be the current behavior of 
> equals.
> Additionally to the operation you can specify a threshold local parameter
> This will provide the ability to search for the term "cat" so long as the 
> payload has a value of greater than 0.75.  
> One use case is to classify a document into various categories with an 
> associated confidence or probability that the classification is correct.  
> That can be indexed into a delimited payload field.  The searches can find 
> and match documents that were tagged with the "cat" category with a 
> confidence of greater than 0.5.
> Example Document
> {code:java}
> { 
>   "id":"doc_1",
>   "classifications_payload":["cat|0.75 dog|2.0"]
> }
> {code}
> Example Syntax
> {code:java}
> {!payload_check f=classifications_payload payloads='1' op='gt' 
> threshold='0.5'}cat  {code}
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to