<
From version < 2.1 >
edited by Vincent Massol
on 2010/12/08 19:42
To version < 6.2 >
edited by Vincent Massol
on 2010/12/13 08:17
>
Change comment: More precise documentation

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -Search Application Query Syntax
1 + Lucene Search Query Help
Parent
... ... @@ -1,1 +1,1 @@
1 -Extension.WebHome
1 +Extension.Search Application
Content
... ... @@ -1,20 +1,10 @@
1 -{{velocity filter="none"}}
2 -{{html clean="false" wiki="true"}}
3 -#startfloatingbox()
4 -**Contents**
1 +{{box cssClass="floatinginfobox" title="**Contents**"}}{{toc/}}{{/box}}
5 5  
6 -{{toc start="2" depth="3" numbered=""/}}
7 -#endfloatingbox()
8 -{{/html}}
9 -{{/velocity}}
10 -
11 -= Lucene Search Query Help =
12 -
13 13  {{info}}
14 -Need more informations ? see the [[lucene website>>http://lucene.apache.org/java/docs/queryparsersyntax.html]]
4 +Need more informations? See the [[lucene website>>http://lucene.apache.org/java/docs/index.html]]. More specifically look for the "Query Syntax" documentation entry for the Lucene Core version matching the version used in your XWiki installation (to find the version used by XWiki look for ##lucene-core-x.y.z.jar## in the XWiki's ##/WEB-INF/lib## folder. For example for XWiki Enterprise 2.6 uses Lucene Core 2.9.3 which means the Lucene Query Syntax can be found [[here>>http://lucene.apache.org/java/2_9_3/queryparsersyntax.html]].
15 15  {{/info}}
16 16  
17 -== Terms ==
7 += Terms =
18 18  
19 19  A query is broken up into terms and operators. There are two types of terms: Single Terms and Phrases.
20 20  
... ... @@ -25,7 +25,7 @@
25 25  Multiple terms can be combined together with Boolean operators to form a more complex query (see below).
26 26  {{/info}}
27 27  
28 -== Wildcard Searches ==
18 += Wildcard Searches =
29 29  
30 30  Lucene supports single and multiple character wildcard searches within single terms (not within phrase queries).
31 31  
... ... @@ -54,7 +54,7 @@
54 54  Note: You cannot use a * or ? symbol as the first character of a search.
55 55  {{/warning}}
56 56  
57 -== Boolean Operators ==
47 += Boolean Operators =
58 58  
59 59  Boolean operators allow terms to be combined through logic operators. Lucene supports AND, "+", OR, NOT and "-" as Boolean operators(Note: Boolean operators must be ALL CAPS).
60 60  
... ... @@ -72,7 +72,7 @@
72 72  "jakarta apache" OR jakarta
73 73  {{/code}}
74 74  
75 -=== AND ===
65 +== AND ==
76 76  
77 77  The AND operator matches documents where both terms exist anywhere in the text of a single document. This is equivalent to an intersection using sets. The symbol && can be used in place of the word AND.
78 78  
... ... @@ -82,7 +82,7 @@
82 82  "jakarta apache" AND "Apache Lucene"
83 83  {{/code}}
84 84  
85 -=== + ===
75 +== + ==
86 86  
87 87  The "+" or required operator requires that the term after the "+" symbol exist somewhere in a the field of a single document.
88 88  
... ... @@ -92,7 +92,7 @@
92 92  +jakarta lucene
93 93  {{/code}}
94 94  
95 -=== NOT ===
85 +== NOT ==
96 96  
97 97  The NOT operator excludes documents that contain the term after NOT. This is equivalent to a difference using sets. The symbol ! can be used in place of the word NOT.
98 98  
... ... @@ -108,7 +108,7 @@
108 108  NOT "jakarta apache"
109 109  {{/code}}
110 110  
111 -=== - ===
101 +== - ==
112 112  
113 113  The "-" or prohibit operator excludes documents that contain the term after the "-" symbol.
114 114  
... ... @@ -118,7 +118,7 @@
118 118  "jakarta apache" &#45;"Apache Lucene"
119 119  {{/code}}
120 120  
121 -=== Grouping ===
111 +== Grouping ==
122 122  
123 123  Lucene supports using parentheses to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query.
124 124  
... ... @@ -130,7 +130,7 @@
130 130  
131 131  This eliminates any confusion and makes sure you that website must exist and either term jakarta or apache may exist.
132 132  
133 -=== Field Grouping ===
123 +== Field Grouping ==
134 134  
135 135  Lucene supports using parentheses to group multiple clauses to a single field.
136 136  
... ... @@ -140,7 +140,7 @@
140 140  title:(+return +"pink panther")
141 141  {{/code}}
142 142  
143 -== Escaping Special Characters ==
133 += Escaping Special Characters =
144 144  
145 145  Lucene supports escaping special characters that are part of the query syntax. The current list special characters are
146 146  
... ... @@ -154,11 +154,11 @@
154 154  \(1\+1\)\:2
155 155  {{/code}}
156 156  
157 -== Searchable fields ==
147 += Searchable fields =
158 158  
159 159  XWiki documents contain wiki content and meta-information, lucene indexes such information in fields.
160 160  
161 -=== wiki ===
151 +== wiki ==
162 162  
163 163  In a wiki farm you can specify a wiki to search in with the "wiki:" prefix.
164 164  
... ... @@ -168,7 +168,7 @@
168 168  test AND wiki:mywiki
169 169  {{/code}}
170 170  
171 -=== title ===
161 +== title ==
172 172  
173 173  Look for documents with title "Welcome to your wiki":
174 174  
... ... @@ -176,7 +176,7 @@
176 176  title:"Welcome to your wiki"
177 177  {{/code}}
178 178  
179 -=== name ===
169 +== name ==
180 180  
181 181  Look for documents named "WebHome":
182 182  
... ... @@ -184,7 +184,7 @@
184 184  name:WebHome
185 185  {{/code}}
186 186  
187 -=== lang ===
177 +== lang ==
188 188  
189 189  Look for "Voila" in french documents :
190 190  
... ... @@ -192,7 +192,7 @@
192 192  Voila AND lang:fr
193 193  {{/code}}
194 194  
195 -=== type ===
185 +== type ==
196 196  
197 197  Type of a document: "attachment", "wikipage" or "objects", used to control presentation of searchresults.
198 198  
... ... @@ -202,7 +202,7 @@
202 202  test AND type:attachment
203 203  {{/code}}
204 204  
205 -=== filename ===
195 +== filename ==
206 206  
207 207  Look for attachments with a filename starting by "test":
208 208  
... ... @@ -210,7 +210,7 @@
210 210  filename:test*
211 211  {{/code}}
212 212  
213 -=== object ===
203 +== object ==
214 214  
215 215  The "object:" prefix allow to search for pages containing objects from a specific class.
216 216  
... ... @@ -220,7 +220,7 @@
220 220  test AND object:XWiki.XWikiComments
221 221  {{/code}}
222 222  
223 -=== author ===
213 +== author ==
224 224  
225 225  Look for documents last modified by XWiki.Admin:
226 226  
... ... @@ -228,7 +228,7 @@
228 228  author:XWiki.Admin
229 229  {{/code}}
230 230  
231 -=== date ===
221 +== date ==
232 232  
233 233  Date format: yyyyMMddHHmm
234 234  
... ... @@ -238,7 +238,7 @@
238 238  date:20090708*
239 239  {{/code}}
240 240  
241 -=== creator ===
231 +== creator ==
242 242  
243 243  Look for documents created by XWiki.Admin:
244 244  
... ... @@ -246,7 +246,7 @@
246 246  creator:XWiki.Admin
247 247  {{/code}}
248 248  
249 -=== creationdate ===
239 +== creationdate ==
250 250  
251 251  Date format: yyyyMMddHHmm
252 252  

Get Connected