Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-4637

Tag suggest feature only queries first 30 tags

    XMLWordPrintable

Details

    • Unknown

    Description

      The tag suggest feature query the first 30 tags of the wiki, and then iterate over them to check if it matches the input selection :

      #set($query = "select distinct list from BaseObject as obj, DBStringListProperty as prop join prop.list list  where obj.className = '${classname}' and obj.id = prop.id.id and prop.id.name = '${fieldname}'")    
      #set($queryResult = $xwiki.search($query.toString(), 30, 0))    
          #set($results = $queryResult.toArray())
          <?xml version="1.0" encoding="UTF-8"?>
          <results type="3">
          #foreach($res in $results)
            #set($list = $p.getListFromString($res, $sep, false))
            #set($list = $list.toArray())
            #foreach($word in $list)
              #if($word.toLowerCase().indexOf($input) >= 0)
                <rs id="$velocityCount" info="">$word</rs>
              #end
            #end
          #end
      

      (from suggest.vm)

      This is not acceptable as wikis can have large number of tags

      Attachments

        1. suggest.vm.patch
          1 kB
          Ludovic Dubost
        2. suggest.vm.patch
          2 kB
          Ludovic Dubost

        Activity

          People

            jerome Jerome Velociter
            jerome Jerome Velociter
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: