<
Von Version < 8.16 >
bearbeitet von Jannis Klein
am 2023/01/04 08:25
Auf Version < 9.1 >
bearbeitet von Jannis Klein
am 2023/01/04 09:49
>
Änderungskommentar: Es gibt keinen Kommentar für diese Version

Zusammenfassung

Details

Seiteneigenschaften
Titel
... ... @@ -1,1 +1,1 @@
1 -Suche
1 +Suche in diesem Handbuch
Inhalt
... ... @@ -1,9 +1,13 @@
1 1  {{aagon.priorisierung}}
2 2  0
3 3  {{/aagon.priorisierung}}
4 +
5 +
6 +
7 +
8 +
4 4  {{include reference="XWiki.SearchCode"/}}
5 5  {{velocity}}
6 -
7 7  ##Einfügen der Suchleiste in die Navigation
8 8  #if($searchEngine == 'solr')
9 9   #set ($solrConfig = {
... ... @@ -25,5 +25,226 @@
25 25  
26 26  #if ("$searchPage" != '')
27 27   {{include reference="$searchPage"/}}
32 +#end{{/velocity}}
33 +
34 +(% class="xwiki-metadata-container xwiki-metadata-container" %){{velocity output="false"}}#set ($supportedLocales = $xwiki.availableLocales){{/velocity}}
35 +
36 +{{velocity output="false"}}#set ($__defaultSolrConfig = {
37 + 'queryFields': {
38 + 'DOCUMENT': 'title^10.0 name^10.0
39 + doccontent^2.0
40 + objcontent^0.4 filename^0.4 attcontent^0.4 doccontentraw^0.4
41 + author_display^0.08 creator_display^0.08
42 + comment^0.016 attauthor_display^0.016 spaces^0.016',
43 + 'ATTACHMENT': 'filename^5.0 attcontent attauthor_display^0.2',
44 + 'OBJECT': 'objcontent',
45 + 'OBJECT_PROPERTY': 'propertyvalue'
46 + },
47 + 'phraseFields': {
48 + 'DOCUMENT': "#expandField('title' '^400.0')
49 + #expandField('doccontent' '^80.0')
50 + filename^90.0 #expandField('attcontent' '^70.0')
51 + comment^50.0
52 + author_display^40.0 creator_display^40.0 attauthor_display^20.0",
53 + 'ATTACHMENT': "filename^90.0 #expandField('attcontent' '^70.0') attauthor_display^40.0",
54 + 'OBJECT': 'objcontent^10.0',
55 + 'OBJECT_PROPERTY': 'propertyvalue^10.0',
56 + '' : "#expandField('title' '^400.0')
57 + #expandField('doccontent' '^80.0')
58 + filename^90.0 #expandField('attcontent' '^70.0')
59 + author_display^40.0 creator_display^40.0
60 + comment^50.0 attauthor_display^20.0
61 + objcontent^10.0 propertyvalue^10.0"
62 + },
63 + 'bigramPhraseFields': {
64 + 'DOCUMENT': "#expandField('title' '^200.0')
65 + #expandField('doccontent' '^40.0')
66 + filename^45.0 #expandField('attcontent' '^35.0')
67 + comment^25.0
68 + author_display^20.0 creator_display^20.0 attauthor_display^10.0",
69 + 'ATTACHMENT': "filename^45.0 #expandField('attcontent' '^35.0') attauthor_display^20.0",
70 + 'OBJECT': 'objcontent^5.0',
71 + 'OBJECT_PROPERTY': 'propertyvalue^5.0',
72 + '' : "#expandField('title' '^200.0')
73 + #expandField('doccontent' '^40.0')
74 + filename^45.0 #expandField('attcontent' '^35.0')
75 + author_display^20.0 creator_display^20.0
76 + comment^25.0 attauthor_display^10.0
77 + objcontent^5.0 propertyvalue^5.0"
78 + },
79 + 'trigramPhraseFields': {
80 + 'DOCUMENT': "#expandField('title' '^300.0')
81 + #expandField('doccontent' '^60.0')
82 + filename^67.5 #expandField('attcontent' '^52.5')
83 + comment^37.5
84 + author_display^30.0 creator_display^30.0 attauthor_display^15.0",
85 + 'ATTACHMENT': "filename^67.5 #expandField('attcontent' '^52.5') attauthor_display^30.0",
86 + 'OBJECT': 'objcontent^7.5',
87 + 'OBJECT_PROPERTY': 'propertyvalue^7.5',
88 + '' : "#expandField('title' '^300.0')
89 + #expandField('doccontent' '^60.0')
90 + filename^67.5 #expandField('attcontent' '^52.5')
91 + author_display^30.0 creator_display^30.0
92 + comment^37.5 attauthor_display^15.0
93 + objcontent^7.5 propertyvalue^7.5"
94 + },
95 + 'phraseFieldSlop': '15',
96 + 'bigramPhraseFieldSlop': '5',
97 + 'trigramPhraseFieldSlop': '10',
98 + 'tieBreaker': '0.1',
99 + 'minShouldMatch': '2',
100 + 'sortFields': {
101 + 'DOCUMENT': {
102 + 'score': 'desc',
103 + 'title_sort': 'asc'
104 + },
105 + 'ATTACHMENT': {
106 + 'score': 'desc',
107 + 'filename_sort': 'asc'
108 + }
109 + },
110 + 'filterQuery': ['locales: "de" OR "en"'],
111 + 'facetFields': ['type', 'space_facet', 'locale'],
112 + 'facetQuery': {
113 + 'type': ['DOCUMENT', 'ATTACHMENT'],
114 + 'locale': ["$xcontext.locale", '']
115 + },
116 + 'facetEnabled': true,
117 + 'facetDisplayers': {
118 + 'type': 'Main.SolrTypeFacet',
119 + 'wiki': 'Main.SolrWikiFacet',
120 + 'space_facet': 'Main.SolrSpaceFacet',
121 + 'locale': 'Main.SolrLocaleFacet',
122 + 'author': 'Main.SolrUserFacet',
123 + 'creator': 'Main.SolrUserFacet',
124 + 'attauthor': 'Main.SolrUserFacet',
125 + 'date': 'Main.SolrDateFacet',
126 + 'creationdate': 'Main.SolrDateFacet',
127 + 'attdate': 'Main.SolrDateFacet',
128 + 'class': 'Main.SolrClassFacet',
129 + 'attsize': 'Main.SolrFileSizeFacet',
130 + 'mimetype': 'Main.SolrMediaTypeFacet'
131 + },
132 + 'facetDisplayersByPropertyType': {
133 + 'Date': 'Main.SolrDateFacet',
134 + 'Users': 'Main.SolrUserFacet',
135 + 'Groups': 'Main.SolrUserFacet'
136 + },
137 + 'facetPaginationStep': 5,
138 + 'facet': {
139 + 'mediaType': {
140 + 'categories': {
141 + 'text': ['text/', 'application/xml', 'application/javascript', 'application/ecmascript',
142 + 'application/json', 'application/x-sh', '+xml'],
143 + 'image': ['image/'],
144 + 'office': ['application/pdf', 'application/postscript', 'application/msword', 'application/vnd.ms-',
145 + 'application/vnd.oasis.opendocument.', 'application/vnd.openxmlformats-officedocument.'],
146 + 'archive': ['application/zip', 'application/x-gzip', 'application/x-bzip', 'application/x-tar',
147 + 'application/x-gtar', 'application/vnd.xara', '-archive', '-compressed', '-package', '+zip'],
148 + 'audio': ['audio/'],
149 + 'video': ['video/'],
150 + 'font': ['application/font-', 'application/x-font-']
151 + },
152 + 'subcategories': {
153 + 'office': {
154 + 'word': ['application/msword', 'application/vnd.ms-word.', 'application/vnd.oasis.opendocument.text',
155 + 'application/vnd.openxmlformats-officedocument.word'],
156 + 'presentation': ['application/vnd.ms-powerpoint', 'application/vnd.oasis.opendocument.presentation',
157 + 'application/vnd.openxmlformats-officedocument.presentation'],
158 + 'spreadsheet': ['application/vnd.ms-excel', 'application/vnd.oasis.opendocument.spreadsheet',
159 + 'application/vnd.openxmlformats-officedocument.spreadsheet']
160 + }
161 + }
162 + },
163 + 'fileSize': {
164 + 'intervals': [
165 + {
166 + 'id': 'tiny',
167 + 'end': 10240
168 + }, {
169 + 'id': 'small',
170 + 'start': 10240,
171 + 'end': 512000
172 + }, {
173 + 'id': 'medium',
174 + 'start': 512000,
175 + 'end': 5242880
176 + }, {
177 + 'id': 'large',
178 + 'start': 5242880
179 + }
180 + ]
181 + }
182 + },
183 + 'wikisSearchableFromMainWiki': $wikisSearchableFromMainWiki,
184 + 'highlightEnabled' : true
185 +})
186 +
187 +#if (!$xcontext.isMainWiki() || !$xwiki.hasSubWikis())
188 + ## Subwikis search by default in their content only so it doesn't make sense to display the wiki facet.
189 + ## It also doesn't make sense to display the wiki facet if there is a single wiki.
190 + #set ($discard = $__defaultSolrConfig.facetFields.remove('wiki'))
28 28  #end
29 -{{/velocity}}
192 +
193 +#if ($solrConfig)
194 + ## Merge the provided configuration with the default configuration.
195 + #set ($discard = $__defaultSolrConfig.putAll($solrConfig))
196 +#end
197 +#set ($solrConfig = $__defaultSolrConfig)
198 +
199 +#macro (expandField $fieldName $fieldBoost)
200 + ${fieldName}__${fieldBoost} ##
201 + #foreach ($locale in $supportedLocales)
202 + ${fieldName}_${locale}${fieldBoost} ##
203 + #end
204 +#end{{/velocity}}
205 +
206 +{{include reference="Main.SolrSearchMacros"/}}{{velocity}}#handleSolrSearchRequest{{/velocity}}
207 +
208 +(% class="search-ui" %)
209 +(((
210 +{{html clean="false"}}
211 +<form class="search-form row" action="https://doc.aagon.com/bin/view/63/Suche/" role="search">
212 +<div class="hidden">
213 +<input type="hidden" name="sort" value="score"/>
214 +<input type="hidden" name="sortOrder" value="desc"/>
215 +<input type="hidden" name="highlight" value="true"/>
216 +<input type="hidden" name="facet" value="true"/>
217 +<input type="hidden" name="r" value="1"/>
218 +<input type="hidden" name="f_type" value="DOCUMENT"/>
219 +<input type="hidden" name="f_type" value="ATTACHMENT"/>
220 +<input type="hidden" name="f_locale" value="de"/>
221 +<input type="hidden" name="f_locale" value=""/>
222 +</div>
223 +<div class="col-xs-12 col-sm-6">
224 +<div class="input-group">
225 +<input type="search" name="text" class="form-control withTip useTitleAsTip"
226 +title="Geben Sie ihre Suchabfrage ein" value=""/>
227 +<span class="input-group-btn">
228 +<button type="submit" class="btn btn-primary">
229 +<span class="fa fa-search"></span>
230 +<span class="sr-only">Suchen</span>
231 +</button>
232 +</span>
233 +</div>
234 +</div>
235 +</form>
236 +{{/html}}
237 +
238 +(% class="hidden" %)
239 +(((
240 +
241 +)))
242 +
243 +(% class="col-xs-12 col-sm-6" %)
244 +(((
245 +(% class="input-group" %)
246 +(((
247 +(% class="xwiki-metadata-container input-group-btn sr-only" %)Suchen
248 +)))
249 +)))
250 +)))
251 +
252 +
253 +
254 +

Navigation

© Aagon GmbH 2024
Besuchen Sie unsere neue Aagon-Community