Method | Description | |
---|---|---|
buildScore ( GraphAware\Common\Type\Node $input, GraphAware\Common\Type\Node $item, GraphAware\Common\Result\Record $record, GraphAware\Reco4PHP\Context\Context $context ) : |
Returns the score produced by the recommended item. | |
defaultScore ( ) : float | ||
discoveryQuery ( GraphAware\Common\Type\Node $input, GraphAware\Reco4PHP\Context\Context $context ) : GraphAware\Common\Cypher\StatementInterface | The statement to be executed for finding items to be recommended. | |
name ( ) : string | ||
produceRecommendations ( GraphAware\Common\Type\Node $input, GraphAware\Common\Result\ResultCollection $resultCollection, GraphAware\Reco4PHP\Context\Context $context ) : |
Returns a collection of Recommendation object produced by this discovery engine. | |
recoResultName ( ) : string | ||
scoreResultName ( ) : string |
public buildScore ( GraphAware\Common\Type\Node $input, GraphAware\Common\Type\Node $item, GraphAware\Common\Result\Record $record, GraphAware\Reco4PHP\Context\Context $context ) : |
||
$input | GraphAware\Common\Type\Node | |
$item | GraphAware\Common\Type\Node | |
$record | GraphAware\Common\Result\Record | |
$context | GraphAware\Reco4PHP\Context\Context | |
return | A single score produced for the recommended item |
public defaultScore ( ) : float | ||
return | float | The default score to be given to the discovered recommended item |
public discoveryQuery ( GraphAware\Common\Type\Node $input, GraphAware\Reco4PHP\Context\Context $context ) : GraphAware\Common\Cypher\StatementInterface | ||
$input | GraphAware\Common\Type\Node | |
$context | GraphAware\Reco4PHP\Context\Context | |
return | GraphAware\Common\Cypher\StatementInterface |
public produceRecommendations ( GraphAware\Common\Type\Node $input, GraphAware\Common\Result\ResultCollection $resultCollection, GraphAware\Reco4PHP\Context\Context $context ) : |
||
$input | GraphAware\Common\Type\Node | |
$resultCollection | GraphAware\Common\Result\ResultCollection | |
$context | GraphAware\Reco4PHP\Context\Context | |
return |
public recoResultName ( ) : string | ||
return | string | The column identifier of the row result representing the recommended item (node) |
public scoreResultName ( ) : string | ||
return | string | The column identifier of the row result representing the score to be used, note that this
is not mandatory to have a score in the result. If empty, the score will be the float value returned by
defaultScore() or the score logic if the concrete class override the buildScore
method. |