fix broken WQL combining plus and or

closed
,
low
,  
13ef41b
 

 

 

  • View
  • Changes
  • Options
  • Related
  • Edit
  • (These are included together on http://grouppatternlanguage.org/wagn/broken_search_example )

     

    http://grouppatternlanguage.org/wagn/assigned_images finds captioned images where +Patterns points to Pattern cards with:

    {"type": "captioned image",
      "plus": ["Patterns", {"refer_to": {"type": "Pattern"}} ]
    }

    http://grouppatternlanguage.org/wagn/images_missing_creator finds captioned images lacking a creator with:

    {"type": "captioned image",
      "or": {"not": {"plus": "creator"},
             "plus": ["creator", {"content": "" } ] }
    }

    So why does http://grouppatternlanguage.org/wagn/combined_search_broken find the same cards as the latter (mostly not plussed to Patterns at all)? Its WQL:

    {"type": "captioned image",
      "plus": ["Patterns", {"refer_to": {"type": "Pattern"}} ],
      "or": {"not": {"plus": "creator"},
             "plus": ["creator", {"content": ""} ] }
    }

    This works, see http://grouppatternlanguage.org/wagn/assigned_images_missing_creator :

    {"type": "captioned image",
      "plus": ["Patterns", {"refer_to": {"type": "Pattern"}} ],
      "not": {"plus": ["creator", {"ne": ""} ] }
    }

     

    Related support tickets: 
    Relevant user stories: 
     add one
  • View
  • Changes
  • Options
  • Related
  • Edit
  • fixed and added test.  (problem was that :plus actually used :or, and the two uses conflicted)

     

    Notes

    add a note

    try it

     

    wagneers

    intro

    videos

    features

    syntax

    weekly calls

    ideas

     

    twitter

    mailing list

     

    developers

    roadmap

    next release

    tickets

    pack API

    REST API

    one-pager

     

    github

    mailing list

     

    wagn.org

    recent

    todo