Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#15 Default full text matching score of 0

open
None
5
2010-06-10
2010-06-10
Sebastian Trueg
No

Currently non-bound full text matching scores are - well unbound. This is perfectly correct but a bit annoying. In Nepomuk I have many queries like the following:

select distinct ?r ?reqProp1 (?v8+?v4) as ?_n_f_t_m_s_ where { { ?r <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag> ?v1 . ?v1 ?v2 ?v3 . ?v2 <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://www.w3.org/2000/01/rdf-schema#label> . ?v3 bif:contains "wurst" OPTION (score ?v4) . } UNION { ?r <http://www.semanticdesktop.org/ontologies/2007/11/01/pimo#hasTag> ?v5 . ?v5 ?v6 ?v7 . ?v6 <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://www.w3.org/2000/01/rdf-schema#label> . ?v7 bif:contains "wurst" OPTION (score ?v8) . } . }

Since only one of the two patterns in the UNION will match either ?v4 or ?v8 will be unbound resulting in ?_n_f_t_m_s_ being unbound. While in this query it is still possible to replace ?v8 by ?v4 that is not the case in all queries, especially when using OPTIONAL patterns.

Thus, it would be great if the unbound scores would simply be set to 0. Another possibility would be to only do that if they are used in expressions like the addition I use.

Discussion

    • assigned_to: nobody --> iv_an_ru