I am checking that if an instance has a value for a specific predicate, bound that value to a specific variable, otherwise, bound that variable to the value 1 of type integer. this is my code
select ?boosted where {
:r1 a ?x
optional
{
?item rs:boostedBy ?boostedOptional
bind (if(bound(?boostedOptional), ?boostedOptional, "1"^^xsd:integer) as ?boosted)
}
}
the value of ?boosted is always empty, look please
why please?
Note
I think you don't need data to test why my code is not working, because for me it sounds like a general mistake about using the bound. however, if you want data, i give you data.
note2
there is no rs:boostedBy predicate from the first place, so i was looking to have the default value always , which is 1 of type integer in this case.