// Extract just the bits that get sent to ES.
const elasticStruct: Object = requestBody.toJSON();
- console.log(JSON.stringify(elasticStruct));
+ console.debug(JSON.stringify(elasticStruct));
const options: any = {search_org: ctx.searchOrg.id()};
if (ctx.global) {
ts.facetFilters.forEach(f => {
if (f.facetValue !== '') {
rootNode.filter(new TermQuery(
- `${f.facetClass}|${f.facetName}`, f.facetValue));
+ `${f.facetClass}|${f.facetName}.facet`, f.facetValue));
}
});
if ($field->facet_field eq 't' && $def->{fields}) {
# Facet fields are used for aggregation which requires
# an additional unaltered keyword field.
- $def->{fields}->{raw} = {type => 'keyword'};
+ $def->{fields}->{facet} = {type => 'keyword'};
}
$logger->debug("ES adding field $field_name: ".