Changes for page Lucene Search Query Help

Last modified by Djebloun Sidali on 2014/02/23 15:55

<
From version < 8.1 >
edited by Eduard Moraru
on 2011/04/20 17:01
To version < 11.1 >
edited by Sergiu Dumitriu
on 2012/08/21 06:33
>
Change comment: Document the mimetype field

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 - Lucene Search Query Help
1 +Lucene Search Query Help
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.enygma
1 +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" &#45;"Apache Lucene"
110 +"jakarta apache" -"Apache Lucene"
111 111  {{/code}}
112 112  
113 113  == Grouping ==
... ... @@ -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.
... ... @@ -252,6 +252,14 @@
252 252  
253 253  Beside Lucene's XWiki specific index fields, querying for documents based on the property values of contained XWiki objects is also possible.
254 254  
262 +Look for the profile page of a user who's first name is 'Administrator'.
263 +
255 255  {{code}}
256 256  XWiki.XWikiUsers.first_name:'Administrator'
257 257  {{/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}}

Get Connected