Tanya,

first I don't see where ?agent1 and ?agent2 are ever bound. Second, if you have FILTER and BIND in the same { ... } block, Jena may actually change the execution order. To make sure that FILTERs get executed before BINDs, use an extra level of { ... } nesting, e.g.

WHERE {
    {
        FILTER ....
    }
    BIND ...
}

HTH
Holger


On 5/21/2014 0:52, Tanya Hiebert wrote:
Sure. I cannot include my project specific data though.

Version: 4.2.1
Product: TBC Free Edition

_Examples_:

WHERE {
    FILTER (?agent1 != ?agent2) .
    ?this a ?type .
    FILTER (?type = <http://example.org/*type_ABC*>) .
    BIND (:ABC_value(?agent1, ?agent2) AS ?ABC_Value) .
    BIND (:ABC_score AS ?ABC_Score) .
}

WHERE {
    FILTER (?agent1 != ?agent2) .
    ?this a ?type .
    FILTER (?type = <http://example.org/*type_XYZ*>) .
    BIND (:XYZ_value(?agent1, ?agent2) AS ?XYZ_Value) .
    BIND (:XYZ_score AS ?XYZ_Score) .
}


When I run the query filtering for type_ABC, the functions in type_XYZ (XYZ_value & XYZ_score) get triggered - thus the filter is not working.




On Tue, May 20, 2014 at 9:54 AM, Mark Graham <[email protected] <mailto:[email protected]>> wrote:

    Hi Tanya,

    When available - can you update with the product and version you
    are using. and a couple of examples of the two spin queries (that
    include filter statements). Also, the input data used if possible.
    This may help the technicians when reviewing this question.

    Thanks,
    Mark

    Thanks,
    Mark


    Mark Graham
    TopQuadrant Support

    *PRODUCT SUPPORT:*

    [email protected] <mailto:[email protected]>
    http://www.topquadrant.com/products/support.html




    On Tue, May 20, 2014 at 9:21 AM, Tanya <[email protected]
    <mailto:[email protected]>> wrote:

        Hello,

        I was wondering if you can help me with a problem which I am
        experiencing. I have two spin:rules associated with a class,
        each with different filters in the WHERE clause, but the
        filters aren't being applied when running the rules, with the
        result that both rules are being executed instead of the one
        rule whose filters are matched by the input data.

         Thank you for your assistance. I really appreciate it. Tanya
-- -- You received this message because you are subscribed to the
        Google
        Group "TopBraid Suite Users", the topics of which include
        Enterprise Vocabulary Network (EVN), TopBraid Composer,
        TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web
        Pages and SPIN.
        To post to this group, send email to
        [email protected]
        <mailto:[email protected]>
        To unsubscribe from this group, send email to
        [email protected]
        <mailto:topbraid-users%[email protected]>
        For more options, visit this group at
        http://groups.google.com/group/topbraid-users?hl=en
        ---
        You received this message because you are subscribed to the
        Google Groups "TopBraid Suite Users" group.
        To unsubscribe from this group and stop receiving emails from
        it, send an email to
        [email protected]
        <mailto:[email protected]>.

        For more options, visit https://groups.google.com/d/optout.


-- -- You received this message because you are subscribed to the Google
    Group "TopBraid Suite Users", the topics of which include
    Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid
    Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
    To post to this group, send email to
    [email protected]
    <mailto:[email protected]>
    To unsubscribe from this group, send email to
    [email protected]
    <mailto:topbraid-users%[email protected]>
    For more options, visit this group at
    http://groups.google.com/group/topbraid-users?hl=en
    ---
    You received this message because you are subscribed to a topic in
    the Google Groups "TopBraid Suite Users" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/topbraid-users/5ZxxlFnWyyI/unsubscribe.
    To unsubscribe from this group and all its topics, send an email
    to [email protected]
    <mailto:[email protected]>.
    For more options, visit https://groups.google.com/d/optout.


--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL 
Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
--- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to