6 Replies Latest reply on Mar 13, 2015 3:29 PM by Brett Meyer

    Design discussion: Free Text Search

    Brett Meyer Apprentice

      [ARTIF-260] Free Text Search for artifacts Enhancement - JBoss Issue Tracker

       

      Currently, the query syntax supports searching metadata values only.  The XPath2 syntax allows wildcard searches using this type of function:

       

      xp2:matches(@FooProp, '.*foo.*') <-- find all artifacts with "foo" in the FooProp custom property

       

      We'd like to expand that in multiple ways:

      1. continue to support querying by single property names
      2. support querying all metadata values
      3. support querying artifact content
      4. support querying both artifact content and metadata

       

      This will involve expanding the 'matches' function arguments.  Here's a proposal, in order of appearance above:

      1. xp2:matches(@FooProp, '.*foo.*')
      2. xp2:matches(@*, '.*foo.*')
      3. xp2:matches(., '.*foo.*')
      4. xp2:matches(*, '.*foo.*')

       

      So, '@*' would search all metadata values.  '.' would follow XPath conventions and search the text-based children of the current node (ie, the artifact's content).

       

      '*' could be used to search both content and metadata, but that's up for discussion.  We'd considered something like xp2:matches(@* | ., 'foo.*'), but that felt a bit wonky (not to mention it'd be a pain to parse).

       

      Any thoughts?  As a user, what would feel more natural?