Open andreasbaumann opened 6 years ago
There exists a method SummarizerFunctionInstance::defineResultName to rename a result. It should be implemented for all standard summarizers.
virtual void strus::SummarizerFunctionInstanceInterface::defineResultName
(const std::string &resultname,
const std::string &itemname
)
I know the resultsname
, where do I get the itemname
from?
In this case this would be forward
. I could pass it from above as additional parameter to the
summarizer function, but for this I have to be able to introspect it.
I would expect to get the name of all possible iterators I can rename via the FunctionDescription...
I also have to implement the virtual function in my own summarizer, forgot it and I'm returning forward
hard-coded...
I'm absolutely unhappy with the current solution: attribute
serves no purpose at all
and the resultnames
just looks weird:
{
"attribute" : "title_attribute",
"name" : "attribute",
"params" : [
{
"key" : "name",
"value" : "title"
}
]
,
"resultnames" : [
{
"key" : "resultname",
"value" : "title_attribute"
}
]
}
It does the job though and gives back summarizer results in the form:
,
{
"key" : "title_attribute",
"value" : "A NAS tale"
}
Using two summarizers with different settings (aka the feature type to summarize) results attributes in the ranklist with identical naming: in our case
forward
.I have no way to distinguish them or name them...