Question

Does anybody know how to do an FQL search in SharePoint 2013? I tried using REST service, and get "we didn't understand your search terms. Make sure they're using proper syntax"

http://**servername**/_api/search/query?querytext='and(string("Word",+mode="simpleall")'&enablefql=true

Any advise?

Was it helpful?

Solution

Did you enable it? Its disabled by default and has to be enabled through PowerShell.

OTHER TIPS

http://servername/_api/search/query?querytext='and(string("Word",+mode="simpleall")'&enablefql=true

first off you have an open bracket without a close bracket 'and(, so do you mean:

http://**servername**/_api/search/query?querytext='and(string("Word",+mode="simpleall"))'&enablefql=true

but it still doesnt look right as it should look on the lines of

http://**servername**/_api/search/query?querytext='Wordtosearch'&enablefql=true

are you trying to performe some logic (and operator) on the query string? i dont know if that is possible but i could be wrong ;) shouldnt it be or, xrank or other? as and operator used like that is set for bool I think?

have a look on this:

this is for fql operators that you can use

http://msdn.microsoft.com/en-us/library/office/ff394606.aspx#fql_and_operator

and

http://msdn.microsoft.com/en-us/library/sharepoint/jj163876.aspx

i would assume that you would need the type (string, int, bool) then the () and within the brackets your word query seperated by , and mode="simpleall"

based on that and is correct and your url is correct, also based from msdn to me its:

http://**servername**/_api/search/query?querytext='and(string("Word"),mode="simpleall")'&enablefql=true

above shows that you have the and wraping the string query (where you missed the bracket) followed but enablefql=true.

The FAST Query Language (FQL) is a powerful query language that enables developers to perform exact searches and to narrow the scope of your search to values that belong to a specific managed property or a full-text index.

Kindly go through the following links to get more idea on FQL syntax,

  1. http://msdn.microsoft.com/en-us/library/office/ff394606.aspx

  2. http://msdn.microsoft.com/en-us/library/jj163973.aspx

  3. http://msdn.microsoft.com/en-us/library/ff394628.aspx#int_overview_web_service

  4. http://blogs.msdn.com/b/nicolasu/archive/2013/01/08/sharepoint-search-2013-changing-the-default-search-operator-from-and-to-or.aspx

  5. http://www.silver-it.com/node/127

Hope this helps you.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top