0

I am using rest api to filter pages and fetch their title and url

//_api/search/query?querytext='Path:http:sharepointpath owstaxIdTaxKeyword:81394a-cedb-4c19
AND 
Title<>sometitle'&rowlimit=5& selectproperties='Title'&enablequeryrules=false

Its fetching from the paths that I specify, but the problem is I want to select pages that do not have title that I give ( Title<>sometitle ). But the query is still returning results with title sometitle What have I missed?

2
  • Have you tried NOT Title="sometitle" ? Commented Nov 3, 2015 at 8:19
  • Thanks NOT Title:sometitle worked Can you post this as answer if its okay? Commented Nov 3, 2015 at 8:22

1 Answer 1

1

Try with this syntax instead:

NOT Title="sometitle"

So your query becomes

//_api/search/query?querytext='Path:http:sharepointpath owstaxIdTaxKeyword:81394a-cedb-4c19
AND NOT Title="sometitle"'&rowlimit=5& selectproperties='Title'&enablequeryrules=false

Your Answer

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

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