Hi, There was another thought in our internal group, I want your opinion will it give me what I am looking for
In fq give following {!frange l=2 u=4}sum( exists(query({!v='code1:3333'})), exists(query({!v='code2:4444'})), exists(query({!v='code3:5555'})), exists(query({!v='code4:6666'})) ) Regards, Prasanna -----Original Message----- From: Michael Kuhlmann [mailto:k...@solr.info] Sent: Thursday, November 24, 2016 4:29 PM To: solr-user@lucene.apache.org Subject: Re: Again : Query formulation help Hi Prasanna, there's no such filter out-of-the-box. It's similar to the mm parameter in (e)dismax parser, but this only works for full text searches on the same fields. So you have to build the query on your own using all possible permutations: fq=(code1:3333 AND code2:4444) OR (code1:3333 AND code3:5555) OR ..... Of course, such a query can become huge when there are more than four constraints. Best, Michael Am 24.11.2016 um 11:40 schrieb Prasanna S. Dhakephalkar: > Hi, > > > > Need to formulate a distinctive field values query on 4 fields with > minimum match on 2 fields > > > > I have 4 fields in my core > > Code 1 : Values between 1001 to 9999 > > Code 2 : Values between 1001 to 9999 > > Code 3 : Values between 1001 to 9999 > > Code 4 : Values between 1001 to 9999 > > > > I want to formulate a query in following manner > > > > Code 1 : 3333 > > Code 2 : 4444 > > Code 3 : 5555 > > Code 4 : 6666 > > > > I want to formulate a query, given above parameters, the result should > contain documents where at least 2 of the above match. > > > > Thanks and Regards, > > > > Prasanna > > > >