none
How to write FQL in querytext field in SharePoint 2013 Search REST API? RRS feed

  • Question

  • I am having double quote symbol issue in my search app, same as http://www.silver-it.com/node/127 says.

    To avoid this issue, I am trying to understand: is it possible to do search request in FQL to the 2013 Search REST web service?

    I know that we can use KQL in querytext, like

    http://sp2013/sites/search/_api/search/query?querytext='Title:"123#123"'&enablefql=false&rowlimit=100&selectproperties='Title'

    But is it possible to write it in FQL? I found that there is a enableFQL property we can set in REST API. What's the function of it?

    http://sp2013/sites/search/_api/search/query?querytext='test'&enablefql=true&rowlimit=100&selectproperties='Title'

    http://sp2013/sites/search/_api/search/query?querytext='string("test case",mode="simpleall")'&enablefql=true&rowlimit=100&selectproperties='Title'

    Right now, the two above requests just give me this error.

    HTTP/1.1 500 Internal Server Error
    {"error":{"code":"-1, Microsoft.Office.Server.Search.REST.SearchServiceException","message":{"lang":"en-US","value":"We didn't understand your search terms. Make sure they're using proper syntax."},"innererror":{"message":"We didn't understand your search terms. Make sure they're using proper syntax


    • Edited by Avantee Tuesday, February 25, 2014 1:22 AM more accurate
    Wednesday, February 19, 2014 1:26 PM

Answers

  • I manged to figured out the cause of this issue.

    I am so careless that I didn't read this article carefully: http://msdn.microsoft.com/en-us/library/office/jj163973.aspx

    To EnableFQL, I need to modify the query transformation in the content source.

    • Marked as answer by Avantee Monday, March 3, 2014 5:51 AM
    Monday, March 3, 2014 5:51 AM

All replies