none
different "scope" with keyword/fql? RRS feed

  • Question

  • HI,

    I have created a new SEARCH SCOPE in FAST Search SSA。

    And I can get results with KEYWORD statement:milk AND scope:PRODUCTS.

    While I will get a error when use FQL statement:and(milk,scope:PRODUCTS),which syas:the scope does not exist.

    When I tried statements such as "and(string(milk),filter(scope:string(PRODUCTS)))",I got the same error.

    Is there any difference between FQL and KEYWORD when use SEARCH SCOPE?


    On Learning Csharp.

    Tuesday, March 20, 2012 1:29 AM

Answers

  • is:statement basically goes for <managed property name>:<statement>

    But it's not for scopes. Scopes is managed on the Sharepoint Side. FAST does not know what is a scope. If you'll look at the query logs, you'll see the that the scope filter is added to the FQL query sent to FAST, which is what we want to imitate.

    So why are we using scopes? Cause Sharepoint uses scopes and it's easy maintenance.

    What you have to do is access the scopes by code, extract the filter and add them to your query, as explained before.

     You can take a look at Search Parts, to see how it's done.

    Amir

    Tuesday, March 20, 2012 8:30 AM

All replies

  • Hi CSharp.

    When you're creating a scope, you're adding a FQL Query as a filter to it.

    When creating your own FQL query, you have to give the filter operator the same FQL query you gave the scope while creating it.

    Example:

    scope rule  = author:starts-with("james");

    New FQL query = and("user query",filter(author:starts-with("james"))

    Do take notice that all texts within the filter operator, are automatically set to be with linguistics off.

    Amir

    Tuesday, March 20, 2012 7:20 AM
  • Hi Amir

    Thank you for your replay!

    I know that I will get results via using your statement. But I have a question,that is:statement such as [and("user query",p:v)] will get the same results!

    That's to say,SEARCH SCOPE is not necessary!Why?

    I want to use SEARCH SCOPE because I can get SEARCH SCOPES via API,and then use them to filter USER QUERY.

    Should I serialize my own statement when query with FQL?

    Looking for your replay.

    Thanks again!


    On Learning Csharp.

    Tuesday, March 20, 2012 7:48 AM
  • is:statement basically goes for <managed property name>:<statement>

    But it's not for scopes. Scopes is managed on the Sharepoint Side. FAST does not know what is a scope. If you'll look at the query logs, you'll see the that the scope filter is added to the FQL query sent to FAST, which is what we want to imitate.

    So why are we using scopes? Cause Sharepoint uses scopes and it's easy maintenance.

    What you have to do is access the scopes by code, extract the filter and add them to your query, as explained before.

     You can take a look at Search Parts, to see how it's done.

    Amir

    Tuesday, March 20, 2012 8:30 AM
  • Get it!

    Thank you.


    On Learning Csharp.

    Wednesday, March 21, 2012 12:54 AM