Changes for page Database Search
Last modified by Administrator on 2024/12/27 14:37
From version
4.1


edited by Administrator
on 2023/12/06 23:37
on 2023/12/06 23:37
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-search-ui/14.10.20]
To version 1.1

edited by Administrator
on 2018/07/24 00:25
on 2018/07/24 00:25
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-search-ui/9.11.7]
Summary
Details
- Page properties
-
- Content
-
... ... @@ -1,7 +1,7 @@ 1 1 {{velocity output="false"}} 2 2 #macro (databaseSearchForm) 3 3 {{html clean="false"}} 4 - <form action="$doc.getURL()" id="searchBar" role="search">4 + <form action="$doc.getURL()" id="searchBar"> 5 5 <div> 6 6 <label for="text" class="hidden">$services.localization.render('search.page.query.label')</label> 7 7 <input type="text" id="text" name="text" class="searchQuery" value="$!escapetool.xml($request.text)" ... ... @@ -56,7 +56,7 @@ 56 56 #databaseAddResults(", BaseObject as obj, StringProperty as prop where $matchLocation obj.name = doc.fullName and prop.id.id = obj.id and upper(prop.value) like upper(:text) escape '!'" $params $results) 57 57 ## Search in big text fields (textarea properties) 58 58 #databaseAddResults(", BaseObject as obj, LargeStringProperty as prop where $matchLocation obj.name = doc.fullName and prop.id.id = obj.id and upper(prop.value) like upper(:text) escape '!'" $params $results) 59 - #set ($discard = $list.addAll($ collectiontool.sort($results, ['date'])))59 + #set ($discard = $list.addAll($sorttool.sort($results, ['date']))) 60 60 #end 61 61 {{/velocity}} 62 62 ... ... @@ -82,21 +82,8 @@ 82 82 #set ($discard = $feed.setDescription($services.localization.render('search.rss', [$text]))) 83 83 #set ($discard = $feed.setLanguage("$xcontext.locale")) 84 84 #set ($discard = $feed.setCopyright($xwiki.getXWikiPreference('copyright'))) 85 - #set ($feedOutput = $xwiki.feed.getFeedOutput($feed, $xwiki.getXWikiPreference('feed_type', 'rss_2.0'))) 86 - 87 87 #set ($discard = $response.setContentType('application/rss+xml')) 88 - #set ($characterEncoding = 'utf-8') 89 - ## Make sure the Character Encoding response header matches the character encoding used to write the response and 90 - ## compute its length. 91 - #set ($discard = $response.setCharacterEncoding($characterEncoding)) 92 - ## We write the output directly to the response to avoid the execution of the Rendering Transformations. 93 - #set ($discard = $response.writer.print($feedOutput)) 94 - ## The content length is measured in bytes and one character can use more than one byte. 95 - #set ($discard = $response.setContentLength($feedOutput.getBytes($characterEncoding).size())) 96 - ## Make sure the entire content is send back to the client. 97 - #set ($discard = $response.flushBuffer()) 98 - ## Make sure XWiki doesn't write any more content to the response. 99 - #set ($discard = $xcontext.setFinished(true)) 86 + {{{$xwiki.feed.getFeedOutput($feed, $xwiki.getXWikiPreference('feed_type', 'rss_2.0'))}}} 100 100 #else 101 101 {{include reference="XWiki.Results"/}} 102 102