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
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?

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

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, privacy policy and cookie policy

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