Changes for page Lucene Search Query Help
Last modified by Djebloun Sidali on 2014/02/23 15:55
Change comment:
Document converted from syntax xwiki/1.0 to syntax xwiki/2.1
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - LuceneSearch QueryHelp1 +Search Application Query Syntax - Content
-
... ... @@ -1,12 +1,20 @@ 1 - {{box cssClass="floatinginfobox" title="**Contents**"}} 2 -{{toc/}} 3 -{{/box}} 1 +{{velocity filter="none"}} 2 +{{html clean="false" wiki="true"}} 3 +#startfloatingbox() 4 +**Contents** 4 4 6 +{{toc start="2" depth="3" numbered=""/}} 7 +#endfloatingbox() 8 +{{/html}} 9 +{{/velocity}} 10 + 11 += Lucene Search Query Help = 12 + 5 5 {{info}} 6 6 Need more informations ? see the [[lucene website>>http://lucene.apache.org/java/docs/queryparsersyntax.html]] 7 7 {{/info}} 8 8 9 -= Terms = 17 +== Terms == 10 10 11 11 A query is broken up into terms and operators. There are two types of terms: Single Terms and Phrases. 12 12 ... ... @@ -17,7 +17,7 @@ 17 17 Multiple terms can be combined together with Boolean operators to form a more complex query (see below). 18 18 {{/info}} 19 19 20 -= Wildcard Searches = 28 +== Wildcard Searches == 21 21 22 22 Lucene supports single and multiple character wildcard searches within single terms (not within phrase queries). 23 23 ... ... @@ -46,7 +46,7 @@ 46 46 Note: You cannot use a * or ? symbol as the first character of a search. 47 47 {{/warning}} 48 48 49 -= Boolean Operators = 57 +== Boolean Operators == 50 50 51 51 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). 52 52 ... ... @@ -64,7 +64,7 @@ 64 64 "jakarta apache" OR jakarta 65 65 {{/code}} 66 66 67 -== AND == 75 +=== AND === 68 68 69 69 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. 70 70 ... ... @@ -74,7 +74,7 @@ 74 74 "jakarta apache" AND "Apache Lucene" 75 75 {{/code}} 76 76 77 -== + == 85 +=== + === 78 78 79 79 The "+" or required operator requires that the term after the "+" symbol exist somewhere in a the field of a single document. 80 80 ... ... @@ -84,7 +84,7 @@ 84 84 +jakarta lucene 85 85 {{/code}} 86 86 87 -== NOT == 95 +=== NOT === 88 88 89 89 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. 90 90 ... ... @@ -100,7 +100,7 @@ 100 100 NOT "jakarta apache" 101 101 {{/code}} 102 102 103 -== - == 111 +=== - === 104 104 105 105 The "-" or prohibit operator excludes documents that contain the term after the "-" symbol. 106 106 ... ... @@ -110,7 +110,7 @@ 110 110 "jakarta apache" -"Apache Lucene" 111 111 {{/code}} 112 112 113 -== Grouping == 121 +=== Grouping === 114 114 115 115 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. 116 116 ... ... @@ -122,7 +122,7 @@ 122 122 123 123 This eliminates any confusion and makes sure you that website must exist and either term jakarta or apache may exist. 124 124 125 -== Field Grouping == 133 +=== Field Grouping === 126 126 127 127 Lucene supports using parentheses to group multiple clauses to a single field. 128 128 ... ... @@ -132,7 +132,7 @@ 132 132 title:(+return +"pink panther") 133 133 {{/code}} 134 134 135 -= Escaping Special Characters = 143 +== Escaping Special Characters == 136 136 137 137 Lucene supports escaping special characters that are part of the query syntax. The current list special characters are 138 138 ... ... @@ -146,11 +146,11 @@ 146 146 \(1\+1\)\:2 147 147 {{/code}} 148 148 149 -= Searchable fields = 157 +== Searchable fields == 150 150 151 151 XWiki documents contain wiki content and meta-information, lucene indexes such information in fields. 152 152 153 -== wiki == 161 +=== wiki === 154 154 155 155 In a wiki farm you can specify a wiki to search in with the "wiki:" prefix. 156 156 ... ... @@ -160,7 +160,7 @@ 160 160 test AND wiki:mywiki 161 161 {{/code}} 162 162 163 -== title == 171 +=== title === 164 164 165 165 Look for documents with title "Welcome to your wiki": 166 166 ... ... @@ -168,7 +168,7 @@ 168 168 title:"Welcome to your wiki" 169 169 {{/code}} 170 170 171 -== name == 179 +=== name === 172 172 173 173 Look for documents named "WebHome": 174 174 ... ... @@ -176,7 +176,7 @@ 176 176 name:WebHome 177 177 {{/code}} 178 178 179 -== lang == 187 +=== lang === 180 180 181 181 Look for "Voila" in french documents : 182 182 ... ... @@ -184,7 +184,7 @@ 184 184 Voila AND lang:fr 185 185 {{/code}} 186 186 187 -== type == 195 +=== type === 188 188 189 189 Type of a document: "attachment", "wikipage" or "objects", used to control presentation of searchresults. 190 190 ... ... @@ -194,7 +194,7 @@ 194 194 test AND type:attachment 195 195 {{/code}} 196 196 197 -== filename == 205 +=== filename === 198 198 199 199 Look for attachments with a filename starting by "test": 200 200 ... ... @@ -202,7 +202,7 @@ 202 202 filename:test* 203 203 {{/code}} 204 204 205 -== object == 213 +=== object === 206 206 207 207 The "object:" prefix allow to search for pages containing objects from a specific class. 208 208 ... ... @@ -212,7 +212,7 @@ 212 212 test AND object:XWiki.XWikiComments 213 213 {{/code}} 214 214 215 -== author == 223 +=== author === 216 216 217 217 Look for documents last modified by XWiki.Admin: 218 218 ... ... @@ -220,7 +220,7 @@ 220 220 author:XWiki.Admin 221 221 {{/code}} 222 222 223 -== date == 231 +=== date === 224 224 225 225 Date format: yyyyMMddHHmm 226 226 ... ... @@ -230,7 +230,7 @@ 230 230 date:20090708* 231 231 {{/code}} 232 232 233 -== creator == 241 +=== creator === 234 234 235 235 Look for documents created by XWiki.Admin: 236 236 ... ... @@ -238,7 +238,7 @@ 238 238 creator:XWiki.Admin 239 239 {{/code}} 240 240 241 -== creationdate == 249 +=== creationdate === 242 242 243 243 Date format: yyyyMMddHHmm 244 244