Changes for page Database Search
Last modified by Thomas Mortagne on 2022/06/29 11:42
From version 2.1
edited by Thomas Mortagne
on 2022/06/29 11:42
on 2022/06/29 11:42
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-search-ui/14.5]
To version 1.1
edited by Administrator
on 2007/07/15 10:39
on 2007/07/15 10:39
Change comment:
There is no comment for this version
Summary
-
Page properties (7 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,0 @@ 1 -#if("$!{request.text}" == '')$services.localization.render('search.page.database.title.noquery')#else$services.localization.render('search.page.database.title.query', [$request.text])#end - Author
-
... ... @@ -1,1 +1,1 @@ 1 - xwiki:XWiki.ThomasMortagne1 +XWiki.Admin - Default language
-
... ... @@ -1,0 +1,1 @@ 1 +en - Syntax
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki 2.01 +XWiki 1.0 - Hidden
-
... ... @@ -1,1 +1,1 @@ 1 - true1 +false - Content
-
... ... @@ -1,6 +1,56 @@ 1 -{{velocity output="false"}} 2 -## This is a retro-compatibility page 3 -## You should use DatabaseSearch page now 4 -{{/velocity}} 1 +1 Search 5 5 6 -{{include reference="DatabaseSearch" /}} 3 +#if(!$request.space) 4 + #set($space = "All") 5 +#else 6 + #set($space = $request.space) 7 +#end 8 + 9 +#set($spacesText = {}) 10 +#set($spaces = $xwiki.spaces) 11 +#set($ok = $spacesText.put("All","All")) 12 +#foreach($space in $spaces) 13 + #set($ok = $spacesText.put($space,$space)) 14 +#end 15 + 16 +#macro(spaceoption $space $selectspace $spacesText) 17 + <option value="$spacesText.get($space)" #if($selectspace == $spacesText.get($space))selected="selected"#end>$space</option> 18 +#end 19 + 20 +#macro(spaceselect $selectspace $spaces $spacesText) 21 + <select name="space"> 22 + #spaceoption("All" $selectspace $spacesText) 23 + #foreach($space in $spaces) 24 + #spaceoption($space $selectspace $spacesText) 25 + #end 26 + </select> 27 +#end 28 +## 29 +## 30 +#set($text = "$!request.getParameter('text')") 31 +#set($utext = $util.encodeURI($text)) 32 +#if($space == "All") 33 + #set($url = $xwiki.getURL("Main.WebSearchRss", "view", "xpage=rdf&text=${utext}" )) 34 +#else 35 + #set($url = $xwiki.getURL("Main.WebSearchRss", "view", "xpage=rdf&space=$space&text=${utext}")) 36 +#end 37 + 38 +<div style="float: right;"> 39 + <a href="$url"><img src="$xwiki.getSkinFile("icons/black-rss.png")" style="border:0px" alt="rss icon" /></a> 40 +</div> 41 + 42 +<form action=""> 43 + {pre} 44 + <div class="centered"> 45 + Query 46 + <input type="text" name="text" value="$xwiki.getFormEncoded($!text)" size="20"/> 47 + in space #spaceselect($space $spaces $spacesText) <input type="submit" value="Search"/> 48 + </div> 49 + {/pre} 50 +</form> 51 + 52 +#includeInContext("XWiki.WebSearchCode") 53 +#includeInContext("XWiki.Results") 54 + 55 +#info("You can also try the new experimental [Lucene Search>Main.LuceneSearch?text=$!utext]. It adds scoring, searching into attachments and search paging. Please let us know what you think about it.") 56 +