Forum Discussion
Pictures and Videos are not treated as "Documents" in Search IsDocument:true
Hi, it makes sense to separate documents from videos and images, as they behave slightly differently in SharePoint. You can extend your KQL query with the following text to get more results:
For Images: ((FileType=gif OR FileType=jpg OR FileType=jpeg OR FileType=bmp OR FileType=dib OR FileType=tif OR FileType=tiff OR FileType=ico OR FileType=png OR FileType=jxr OR FileType=svg))
For Videos: (FileType:3gp OR FileType:asf OR FileType:avi OR FileType:mkv OR FileType:mod OR FileType:mov OR FileType:mp4 OR FileType:m4v OR FileType:mpeg OR FileType:mpg OR FileType:mts OR FileType:ts OR FileType:vob OR FileType:wmv OR FileType:webm)
You can also try filtering data by ContentType, but I believe the previous method should include all the missing files.
Thanks,
But I would like to have a query what returns all files (no folders)
I thought that IsDocument:true is a query that returns all files, but it seems I was wrong?
The pictures and videos where just an example - so your approach will work for them but maybe later I encounter other files that are also not treated as "Documents"?
How can I be sure to return everything that is a file?