0

I am using below query to return only documents sorted by LastModifiedTime and displaying it in a Content Search Web part.

path:"https://***.sharepoint.com" (FileExtension:doc OR FileExtension:docx OR FileExtension:xls OR FileExtension:xlsx OR FileExtension:ppt OR FileExtension:pptx) (IsDocument:"True" OR contentclass:"STS_ListItem") Author:{User.Name} LastModifiedTime>{Today-30}

It works fine and returns documents sorted by LastModifiedTime specific to a logged in user. But the issue I am noticing is when someone uploads documents, they can not see it in the web part unless and until its modified/edited.

So can someone help me edit the above query to change it so that it shows Uploaded docs as well sorted by time if in case user has not edited any docs. Thanks in advance.

  • By default, uploading a documents sets the properties for modified and modified by to the same person/timestamp when it was created and by who. The reason they are not seeing anything might be because the content has yet to be crawled to the search index. – Christoffer Jun 7 '18 at 14:34
  • Thanks for your response Christopher. I guess you misunderstood my question.. I am displaying documents sorted by LastModifiedTime which triggers when someone edits the document. My question is what should I change in the query so that it also return Newly uploaded documents. Thanks. – mdevm Jun 7 '18 at 15:09
  • Ah, I see. But my statement is still correct. When a document is uploaded, SharePoint sets the modified date to the same as the created date so they should show up. What behavior are you seeing? Try to upload a new document and wait 15-20 minutes, without modifying it, and it should show up as modified. – Christoffer Jun 8 '18 at 6:55
  • It does not show uploaded documents rather I am only seeing documents that are modified in about 10 mins. – mdevm Jun 8 '18 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.