Friday 22 July 2011

Working with QR Server in FS4SP

Overview:  The Query Results Server is an IIS website that allows you to check that FAST search is working.  You can see if managed properties are being populated, navigators are working ect...
Tips:
  • To use QR-Server you must be on the local machine use the url: http://localhost:13280/
  • SP2010 uses a users session for security so using QR-Server won't work (always returns empty results) so you need to turn off security as follows:
1.> Turn off security in the config file C:\FASTSearch\etc\qrserver\qtf-config.xml (take a copy before modifying the file);
2.> Comment out the line element instance-ref name="securityfql" critical="1"
3.> PS C:\FASTSearch\bin> .\nctrl.exe restart qrserver
This will make the QR-Server take the xml config security change.
4.> Perform your query

Thanks to Job Maelene for all his FS4SP patience.


More Info:
leonardocsouza has a great series on FS4SP

4 comments:

Mikael Svenson said...

You might want to check out http://fs4splogger.codeplex.com/

-m

Marcus said...

Note that disabling the securityfql QT stage will disable document-level security in general, not only when you're querying manually against the qrserver.

Leonardo Souza said...

Good tip about FAST's QRServer, Paul!

I have just two comments on it:
1 - Technically speaking the QRServer has its own HTTP server mechanism and as far as I know it has nothing to do with IIS (after all it has been there since before FAST Search was acquired by Microsoft :))

2 - People should avoid playing with qtf-config.xml in development and should definitely not do it altogether in a production environment.

Another way to get secure results through the QRServer without having to modify qtf-config.xml (and disable security completely) would be this:

1. Edit %FASTSEARCH%\components\sam\worker\user_config.xml

2. Change:
<add name="AllowNonCleanUpClaimsCacheForTestingOnly" value="false" type="System.Boolean" />

To:
<add name="AllowNonCleanUpClaimsCacheForTestingOnly" value="true" type="System.Boolean" />

3. To pick up your changes, open a cmd window restart the samworker.
nctrl restart samworker

4. Make sure the samworker is running. If it is not running, check your previous edits.
nctrl status

5. On the custom search site, issue a query. Ensure results are returned.

6. Navigate to %FASTSEARCH%\var\log\querylogs and open your latest query log (if the file is locked; make a copy of the file and open the copy).

7. Locate and copy this parameter: &qtf_securityfql:uid= <token>=. The trailing equal sign should be included.

8. Navigate to the qrserver page: http://localhost:13280/

9. In the additional parameters text box add:
&qtf_securityfql:uid=<token>=

10. Issue a query and ensure you get results.

Hope that helps!

Best,
Leo

Paul Beck said...

Marcus's point is very important. I.e. Don't disable securityfql on production boxes.

Post a Comment