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

Mikhail Khludnev commented on LUCENE-7148:
------------------------------------------

my solution is subtle different:
{{fq={!frange cache=false 
l=0}sub(titleLength,sum(query($bq1),query($bq2),query($bq3),..))&bq1=title:smith^=1&bq2=title:john^=1&..&fq={!lucene
 df=title cache=false}john smith}} 
It works, though a little bit verbose. I don't see what can be built in Solr or 
Lucene, I'd rather see it as a hackish oneliner, which is as verbose as rarely 
useful.  

> Support boolean subset matching
> -------------------------------
>
>                 Key: LUCENE-7148
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7148
>             Project: Lucene - Core
>          Issue Type: New Feature
>          Components: core/search
>    Affects Versions: 5.x
>            Reporter: Otmar Caduff
>              Labels: newbie
>
> In Lucene, I know of the possibility of Occur.SHOULD, Occur.MUST and the 
> “minimum should match” setting on the boolean query.
> Now, when querying, I want to
> - (1)  match the documents which either contain all the terms of the query 
> (Occur.MUST for all terms would do that) or,
> - (2)  if all terms for a given field of a document are a subset of the query 
> terms, that document should match as well.
> Example:
> Document d hast field f with terms A, B, C
> Query with the following terms should match that document:
> A
> B
> A B
> A B C
> A B C D
> Query with the following terms should not match:
> D
> A B D



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to