3

I'm using the Search Api to get the last modified documents by the person using the search. My search string is looking like that:

https://www.intranet.i/site/_api/search/query?querytext='* author:<UserName>'&rowlimit=5&sortlist='LastModifiedTime:descending'&refinementfilters='IsDocument:true'

But there were no search results returned, any advice?

Thanks in advance!

0

1 Answer 1

5

I think the "show-stopper" is the use of the * in your query.

Try it like this instead:

https://www.intranet.i/site/_api/search/query?querytext='author:<UserName>'&rowlimit=5&sortlist='LastModifiedTime:descending'&refinementfilters='IsDocument:true'

You should be able to use the wildcard (*) together with a porperty name though, like

author:*

I have found this tool https://sp2013searchtool.codeplex.com/, which helps you construct and try your queries :)

Edit Seems you are also having problems with the refinementfilters part. In this case I think you should add that part to your querystring instead:

https://www.intranet.i/site/_api/search/query?querytext='author:<UserName> IsDocument:true'&rowlimit=5&sortlist='LastModifiedTime:descending'
3
  • thanks. without the refinementfilter it works fine, but with the refinementfilter i'm getting no results
    – mbauer
    Feb 26, 2014 at 8:38
  • Can't you just add the refinement filter to your querytext instead? Feb 26, 2014 at 8:42
  • No problem, glad to help :) Feb 26, 2014 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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