Changes for page Lucene Search Query Help
Last modified by Djebloun Sidali on 2014/02/23 15:55
Change comment:
Document the mimetype field
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - 1 +Lucene Search Query Help - Author
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki.e nygma1 +xwiki:XWiki.Sergiu - Content
-
... ... @@ -107,7 +107,7 @@ 107 107 To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query: 108 108 109 109 {{code}} 110 -"jakarta apache" -"Apache Lucene"110 +"jakarta apache" -"Apache Lucene" 111 111 {{/code}} 112 112 113 113 == Grouping == ... ... @@ -148,7 +148,7 @@ 148 148 149 149 = Searchable fields = 150 150 151 -XWiki documents contain wiki content and meta-information ,lucene indexes such information in fields.151 +XWiki documents contain wiki content and meta-information. Lucene indexes such information in fields. 152 152 153 153 == wiki == 154 154 ... ... @@ -196,12 +196,19 @@ 196 196 197 197 == filename == 198 198 199 -Look for attachments with a filename starting by"test":199 +Look for attachments with a filename starting with "test": 200 200 201 201 {{code}} 202 202 filename:test* 203 203 {{/code}} 204 204 205 +== mimetype == 206 + 207 +Look for attachments with a certain MIME type. Examples: 208 + 209 +* Search for PDFs only: {{code language="none"}}mimetype:application/pdf{{/code}} 210 +* Search for all attachments except images: {{code language="none"}}type:attachment -mimetype:image/*{{/code}} 211 + 205 205 == object == 206 206 207 207 The "object:" prefix allow to search for pages containing objects from a specific class. ... ... @@ -247,3 +247,19 @@ 247 247 {{code}} 248 248 creationdate:20090708* 249 249 {{/code}} 257 + 258 +== Searching for fields in XWiki objects == 259 + 260 +Beside Lucene's XWiki specific index fields, querying for documents based on the property values of contained XWiki objects is also possible. 261 + 262 +Look for the profile page of a user who's first name is 'Administrator'. 263 + 264 +{{code}} 265 +XWiki.XWikiUsers.first_name:'Administrator' 266 +{{/code}} 267 + 268 +Look for all users or groups, except the group template: 269 + 270 +{{code}} 271 ++(object:XWiki.XWikiUsers object:XWiki.XWikiGroups) -name:XWikiGroupTemplate 272 +{{/code}}