0

I need to get all documents that are currently checked out in a site collection or web application using search. Also I need to get the time at which they were checked out.

Is it possible to this with search only.

Note: This whole process must be done through SharePoint search only.

  • 2
    I think you will not be able to do it with search since search only indexes checked-in / major versions – Robert Lindgren Aug 17 '18 at 12:07
1

Mind you, you can do this but there are limitations...

  • Files that have never been checked in cannot be indexed, therefore they will never be found by the search.
  • If you were to access a file from the search that is checked out, you would be in fact opening the last checked in version.

So the column you are interested in is CheckoutUser. If a file is checkedout, this column will have a value. If the file is not checked out, this column will be blank. This column's crawled property points to the managed property mvCheckoutUser.

So all you had to do is search for mvCheckoutUser when it is not empty. Here you may have to be a little hacky and do something like:

mvCheckoutUser:a OR mvCheckOutUser:b OR mvCheckOutUser:c ...

  • 1
    I think this could work, but you'll need the wildcards: mvCheckoutUser:"a*" OR mvCheckOutUser:"b*" ... – Derek Gusoff Aug 17 '18 at 14:04
  • Agreed. That's the weak part about it. – Kyle Rogers-Brodeur Aug 17 '18 at 14:11
  • I could not find any Managed property with this name. Does this have the same name in SharePoint Online as well ? – Ravi Aug 17 '18 at 14:23
  • That is a really good question. Myself I was using SharePoint 2016. Might I suggest for you looking at the crawled properties section and search CheckoutUser. Thats the column we care about, and there you should be able to see what crawl properties pull from it, and from there what managed properties access it. – Kyle Rogers-Brodeur Aug 17 '18 at 14:29
  • @KyleRogers-Brodeur I was able to find Managed Property named "CheckoutUserOWSUser" after crawling my site. I will try to work with that. Thanks. Do we have something for finding duration of checkout? – Shashank Aug 17 '18 at 15:43

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.