none
How to compile a scope? RRS feed

  • Question

  • I created a bunch of scopes using...

    $site_Name = "My Projects"

    $folder_Path = $the_site + "sites/myprojects"

    $owning_Site = $the_site + "sites/myprojects"

    $filter = "‘path:starts-with(`"" + $folder_Path + "`")’"

    New-SPEnterpriseSearchQueryScope -SearchApplication $searchapp -Name $site_Name -Description $site_Name -DisplayInAdminUI 1 –OwningSiteUrl $owning_Site -ExtendedSearchFilter $filter -CompilationType 1

    When I run...

    $searchapp = Get-SPEnterpriseSearchServiceApplication "FAST Query SSA"

    "**********"

    $searchapp

    "**********"

    $scopes = Get-SPEnterpriseSearchQueryScope -SearchApplication $searchapp

    "**********"

    $scopes

    "**********"

    It shows the scopes and they all have...

    CompilationType : AlwaysCompile

    CompilationsState : Empty

    LastCompilationTime : 1/1/001 12:00:00 AM

    I tried to programatically kick off the compilation using

    SearchServiceApplication.StartScopesCompilation();

    It doesn't catch an exception when called, so I assume it worked. But it doesn't look like it started compilation.

    When I try to query against any of the scopes I get an error 'Your query is malformed. Please rephrase your query.' I can query against 'All Sites' fine.

    One thing of note, for the scopes, for the scopes the LastModifiedBy login is not the same login as the user who is the FAST search admin. The user is a SP admin and server admin.

    What do I need to do to get the scopes compiled?

    Wednesday, August 18, 2010 8:24 PM

All replies

  • Hi again charie!

    Could you explain how you are executing these queries?

    When using a FAST Search Center I usually test it by executing a query like this:

    scope:MyScopeName mytestquery

    And as far as I can tell the FAST scopes don't need to be compiled, but they take a while to be loaded and available after been created.

    Until then, the error message you will receive will be this one: "Scope in your query does not exist.".

    Query is malformed seems to indicate that your FQL may be incorrect. Could you share some examples of your FQL Rules?

    --Leo

    Wednesday, August 18, 2010 8:38 PM
  • I created a FAST search center.

    I went to the search settings for a site and set it to use the fast search center.

    I went to search scopes for the site and clicked o display groups and selected the scopes I wanted to search on.

    I search from the search boxes/scope dropdown on the top right of my home page. If I select 'all sites', it works. If I select any of my scopes, I get an error.

    Wednesday, August 18, 2010 8:43 PM
  • A example of a Filter is...

    'path:starts-with("http://nichdmossinsdr3/sites/myprojects")'

    Wednesday, August 18, 2010 8:45 PM
  • Here's the info for a scope that doesn't work.

    ID                      : 100
    Name                    : My Projects
    Description             : My Projects
    OwningSite              : SPSite Url=http://nichdmossinsdr3/sites/myprojects
    DisplayInAdminUI        : True
    AlternateResultsPage    :
    CompilationType         : AlwaysCompile
    CompilationState        : Empty
    LastCompilationTime     : 1/1/0001 12:00:00 AM
    LastModifiedTime        : 8/18/2010 8:32:56 PM
    LastModifiedBy          : ****\****
    Count                   : 0
    ContainingDisplayGroups : {}
    Rules                   : {}
    Filter                  : `path:starts-with("http://nichdmossinsdr3/sites/myprojects")'
    CanBeDeleted            : True

    Wednesday, August 18, 2010 8:50 PM
  • Have you tried to execute the query adding the scope directly in the search box at the FAST Search Center?

    For example: scope:"My Projects"

    This will tell you if the Scope itself is working.

    Wednesday, August 18, 2010 9:18 PM
  • When you do a search with a scope selected or checked, that's what's done automatically.
    Wednesday, August 18, 2010 10:57 PM
  • I found a solution.

    Replacing

    $filter = "‘path:starts-with(`"" + $folder_Path + "`")’"

    with

    $filter = ‘path:starts-with(' + '"' + $folder_Path + '")'

    Fixes it.

    I guess FAST didn't like the single quotes around the filter.

    Thursday, August 19, 2010 3:26 PM