This commit changes how the ranker graph is created in the case of qnodes bound to multiple knodes. This change fixes the problem where results with sets score significantly higher than results without sets. (It turns out that increasing the number of nodes in a set always increases result score)
Currently, the ranker graph is a weighted version of the question graph (plus support edges), except when qnodes were bound to a set of knodes. With this change, we aggregate nodes bound to the same qnode, making ranker graph a weighted question graph even in the case of sets. To compute the weights of each qedge, we aggregate multiple weights. There are several one-to-many relationships between the given weights and the qedges.
A single qedge can be bound to multiple kedges.
A single kedge can have weights from multiple sources.
Weights of a single source can come from multiple attributes.
We repeatedly merge the weights from the attribute level up to the qedge level using merge_weights to assign each qedge a single weight.
This commit changes how the ranker graph is created in the case of qnodes bound to multiple knodes. This change fixes the problem where results with sets score significantly higher than results without sets. (It turns out that increasing the number of nodes in a set always increases result score)
Currently, the ranker graph is a weighted version of the question graph (plus support edges), except when qnodes were bound to a set of knodes. With this change, we aggregate nodes bound to the same qnode, making ranker graph a weighted question graph even in the case of sets. To compute the weights of each qedge, we aggregate multiple weights. There are several one-to-many relationships between the given weights and the qedges.
We repeatedly merge the weights from the attribute level up to the qedge level using
merge_weights
to assign each qedge a single weight.