Hy, I have the following query:
facet.mincount=1&fl=id&fq={!tag=cf}category:"Membranes"&json.facet={
fields:{
domain:{blockChildren:"content_type:part"},
type:terms,
field:field_name,
limit:-1,
facet:{
stringValues:{
type:terms,
field:string_value,
sort:{index:asc},
limit:-1,
},
numValues:{
type:terms,
field:num_value,
sort:{index:asc},
limit:-1,
}
}
},
brands:{
type:terms,
field:brand_id,
sort:{index:asc},
limit:-1,
},
categories:{
domain:{excludeTags:cf}
type:terms,
sort:{index:asc},
field:category_id,
limit:-1,
}
}&q=content_type:part&rows=12&sort=brand+ASC,name+ASC&start=0
Im grouping the facets by field name(flow,size,weight, etc..), then get the num_values and string_values
Example for the facet response:
....
"fields":{
"buckets":[{
"val":"flow",
"count":14,
"stringValues":{
"buckets":[]},
"numValues":{
"buckets":[{
"val":2100.0,
"count":1},
{
"val":2250.0,
"count":2},
{
"val":2600.0,
"count":1},
{
"val":6000.0,
"count":1},
{
....
I want to add the following filter querys for the request:
fq={!parent+which=content_type:part}++field_name:flow++num_value:("2100"+OR+"2250"+OR+"2600")&fq={!parent+which=content_type:part}++field_name:nominal_salt_rejection++string_value:("99.50%")
I can add {!tag=...} param for every field query, but how can I pick the right one based on the actual facet?
How can I archive faceting results where the parent facet query field name is matching with the field name in the field query, exclude the specific filtering query for self?
so if it the "flow" field in the fields facet, exlude the matching field query "field_name:flow++num_value:("2100"+OR+"2250"+OR+"2600") query for the values result list.