Pablo Anzorena created SOLR-8572:
------------------------------------
Summary: Json Facets not working correctly when request is "quite
complex"
Key: SOLR-8572
URL: https://issues.apache.org/jira/browse/SOLR-8572
Project: Solr
Issue Type: Bug
Components: Facet Module
Affects Versions: 5.2.1
Reporter: Pablo Anzorena
Solr Version: 5.2.1
Here is the json.facet parameter request:
{
mes: {
type: terms,
field: mes,
limit: 1,
offset: 0,
mincount: 1,
sort: "index desc",
missing: false,
numBuckets: true,
allBuckets: true,
facet: {
mostrar_cant_teus: "sum(mostrar_cant_teus)",
AUX: {
type: query,
q: "cod_coo:(CN)",
facet: {
cod_coo: {
type: terms,
field: cod_coo,
limit: 1,
offset: 0,
mincount: 1,
sort: "mostrar_cant_teus desc",
missing: false,
numBuckets: true,
allBuckets: true,
facet: {
mostrar_cant_teus: "sum(mostrar_cant_teus)",
AUX: {
type: query,
q: "cod_port_of_dep:(57035)",
facet: {
cod_port_of_dep: {
type: terms,
field: cod_port_of_dep,
limit: 1,
offset: 0,
mincount: 1,
sort: "mostrar_cant_teus desc",
missing: false,
numBuckets: true,
allBuckets: true,
facet: {
mostrar_cant_teus: "sum(mostrar_cant_teus)"
}
}
}
},
AUX: {
type: query,
q: "nro_shipper_unif:(1)",
facet: {
nro_shipper_unif: {
type: terms,
field: nro_shipper_unif,
limit: 1,
offset: 0,
mincount: 1,
sort: "mostrar_cant_teus desc",
missing: false,
numBuckets: true,
allBuckets: true,
facet: {
mostrar_cant_teus: "sum(mostrar_cant_teus)"
}
}
}
}
}
}
}
},
AUX: {
type: query,
q: "cod_transportista:(MSCU)",
facet: {
cod_transportista: {
type: terms,
field: cod_transportista,
limit: 1,
offset: 0,
mincount: 1,
sort: "mostrar_cant_teus desc",
missing: false,
numBuckets: true,
allBuckets: true,
facet: {
mostrar_cant_teus: "sum(mostrar_cant_teus)",
AUX: {
type: query,
q: "hs2:(94)",
facet: {
hs2: {
type: terms,
field: hs2,
limit: 1,
offset: 0,
mincount: 1,
sort: "mostrar_cant_teus desc",
missing: false,
numBuckets: true,
allBuckets: true,
facet: {
mostrar_cant_teus: "sum(mostrar_cant_teus)"
}
}
}
}
}
}
}
}
}
},
mostrar_cant_teus: "sum(mostrar_cant_teus)"
}
And the "facets" response is the following:
"facets": {
"count": 42663421,
"mostrar_cant_teus": 60686638.53527718,
"mes": {
"numBuckets": 12,
"allBuckets": {
"count": 42663421,
"mostrar_cant_teus": 60686638.53527718
},
"buckets": [
{
"val": "201412",
"count": 3534902,
"mostrar_cant_teus": 5001808.791391041,
"AUX": {
"count": 238136,
"cod_transportista": {
"numBuckets": 1,
"allBuckets": {
"count": 238136,
"mostrar_cant_teus": 390971.76781999925
},
"buckets": [
{
"val": "MSCU",
"count": 238136,
"mostrar_cant_teus": 390971.76781999925,
"AUX": {
"count": 22291,
"hs2": {
"numBuckets": 86,
"allBuckets": {
"count": 25075,
"mostrar_cant_teus": 58216.2562400001
},
"buckets": [
{
"val": "94",
"count": 22291,
"mostrar_cant_teus": 44126.786240000154
}
]
}
}
}
]
}
}
}
]
}
}
The problem is in the response. It is not retrieving information on the field
cod_coo. Of course it is independent of the cod_coo field, I tried with other
fields and it keeps ignoring them also.
All the fields are of the type string, except from hs2 which is of type
"text_ws".
Let me know if you need any more info.
Thanks.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]