i'm on SP2013 Enterprise Edition and have a little problem to solve.
What i want to achieve
i would like to display all the new items through all my site collection except the images. So, for example, if a user creates an article, a page, upload/create a document or add a list item with a custom content type, i would like it to appear in my CSWP. But, if th user add an image, i don't want it to be displayed in my CSWP.
Simple, right? That is what i thought...
What I did
... Until i set my CSWP : here is the query i used (generated by the CSWP manager) :
path:"http://mySiteCollection" (IsDocument:"True" OR contentclass:"STS_ListItem")
So, as you can see, there is no restriction and that is totally normal. it gives me every new item created in my site collection, and when I have an image uploaded in a Publishing Images Library, the path generated is the one to the properties displayForm .
What i tried
In the Advanced mode of the cswp manager, i tried to add a property filter : column ContentType is different of "Image Content", which gives me the following query :
path:"http://mySiteCollection" (IsDocument:"True" OR contentclass:"STS_ListItem") ContentType<>0x0101009148F5A04DDD49CBA7127AADA5FB792B00AADE34325A8B49CDA8BB4DB53328F214*
And... it does not work. My images are still displayed and the path is still the one to the properties Form.
i tried with the "Image" Content type and had no more success with it... Maybe i'm doing it wrong, but i don't know what to do more.
Do you have any idea on how i could drum out the Images of the search result, please ?
thanks a lot, have a nice day !