Nathan wrote:
>
> SELECT DISTINCT ?s (sum(?oscore)) as ?finalWeight WHERE {
> { select ?s (xsd:integer( ?oscore * 1.4 )) as ?weight where {
> ?s <predicate1> ?o . ?o bif:contains '"search text"' option(score ?oscore)
> } } UNION {
> { select ?s (xsd:integer( ?oscore * 1.8 )) as ?weight where {
> ?s <predicate2> ?o . ?o bif:contains '"search text"' option(score ?oscore)
> }
> } GROUP BY ?s
> ORDER BY desc(?finalWeight)
>
correction, that first line should be:
SELECT DISTINCT ?s (sum(?weight)) as ?finalWeight WHERE {
also realised I forgot to point out the two different modifiers, 1.8 and
1.4 which does the weighting!
regards