Override Size limitation of Fql Query RRS feed

  • Question

  • Hi

    As stated in msdn site fql can have only 2048 character.Is there any way we can increase the query length?


    Wednesday, November 9, 2011 1:43 PM

All replies

  • Hi,

    I did some tests directly towards the QR server, and I get a parse error (1201) when the query is above approximately 2700 characters, so you might be able to go above 2048, but not much. I am not aware of any settings to change this and I suspect it might be a limitation of the internal fql parser.

    I guess you can gain some characters by creating smarter fql, and by shortening managed property names which you query against. But the drawback is less readable property names. And 2048 is really not that much when you start to generate queries automatically.

    Say you add 20 document promotions each with a long url of 100 characters, and you are pretty close to the limit already. Maybe someone else has some insight to this?

    Mikael Svenson 

    Search Enthusiast - SharePoint MVP/WCF4/ASP.Net4
    Wednesday, November 9, 2011 6:55 PM
  • Hi,

    A small update. Investigating a bit more I checked my the query logs (\var\log\querylogs), and the failed queries are all http requests of type GET with length 4096.

    So seems it's a limit for the webserver of the QR server to maximum support queries of 4096 characters. This is easily overcome by using POST, but the question is how do we change the QRProxyService to use POST against the QRServer on port 13280 instead of GET (without hacking it). I will dig at this some more.

    I have not found a way without hacking it, but hacking it will most likely work. I just don't have the time to confirm it just now - and will probably void all warranty etc. We can only hope they change this behavior in the QRProxy server.

    Mikael Svenson 

    Search Enthusiast - SharePoint MVP/WCF4/ASP.Net4
    Wednesday, November 9, 2011 8:32 PM
  • I believe the qrserver's GET limit can be adjusted up in FAST ESP, and I think by default it's higher than 4096.  FAST has an httpd.conf file which I think governs all the http traffic, so it's easy to add a non-default limit.  But that httpd.conf file is gone in FS4SP, and probably anything borrowed from apache was pulled out.  Under FASTSearch\META\config\profiles\default\templates\installer\etc, there are a number of xml files containing WCF http binding stuff, totally unfamiliar to me.  I assume the apache httpd has been replaced by the equivalent WCF thing.  There's a file FASTSearch\etc\QRProxyService.exe.config, which contains a slew of TCP binding information.  But I don't see an equivalent for the qrserver itself.
    Friday, June 8, 2012 8:51 PM
  • Hi,

    If you can figure out how to up the 4096 limit on the QR server you are good to go. The WCF proxy has no problem with >4096 bytes and is the component doing the GET request towards the QR server.

    As I said, the best solution in my opinion would be to have the QR proxy do a POST instead of GET, as POST is meant for larger data chunks. GET was never meant for transferring huge payloads on requests. And POST works just fine if you bother to hack the QR Proxy, or you can put another web proxy which handles large GET's inbetween which turns the GET into a POST.

    But someone has to voice this as an issue with MS support before they change it.

    Mikael Svenson

    Search Enthusiast - SharePoint MVP/MCT
    Author of Working with FAST Search Server 2010 for SharePoint

    Saturday, June 9, 2012 8:53 AM