×

Loading...
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。

There are two ways....

[1] make a catalog specific to the folder you want to search for and make the search scope as "/".

set Q = Server.CreateObject("ixsso.Query")
set Util = Server.CreateObject("ixsso.Util")

Q.Catalog = "myfolder"
Q.Query = CompSearch
Q.SortBy = "rank[d]"
Q.Columns = "DocTitle, vpath, filename, size, write, characterization, rank"

if MaxResults <> -1 then
Q.MaxRecords = MaxResults
end if

Dim FormScope;
FormScope = "/"

if FormScope <> "\" then
Util.AddScopeToQuery Q, FormScope, "deep"
end if

.....

[2] change your scope to "/foldername/"

[3] to get vpath and characterization

set RS = Q.CreateRecordSet("nonsequential")

myVpath = RS("vpath")

myCharaterization = RS("characterization") or Server.HTMLEncode(RS("characterization"))

Hope that helps.
Report

Replies, comments and Discussions:

  • 工作学习 / 专业技术讨论 / Anybody knows indexing service?
    • On IIS? What is the issue?
    • 比方我只有一个文件夹,要查。而且我建了一个那个文件夹的catalog。怎么把wwwroot底下别的文件夹去掉?我每次查出来的都是wwwroot底下全部文件。
      • I got it, thanks
    • set www server to none it cannot return vpath and Characterization(empty), or set to defualt website it seach every folder under wwwroot. any idea? folks?
      i want: 1. seach only one folder under wwwroot 2. i need Characterization, vpath I know how to get
      • There are two ways....
        [1] make a catalog specific to the folder you want to search for and make the search scope as "/".

        set Q = Server.CreateObject("ixsso.Query")
        set Util = Server.CreateObject("ixsso.Util")

        Q.Catalog = "myfolder"
        Q.Query = CompSearch
        Q.SortBy = "rank[d]"
        Q.Columns = "DocTitle, vpath, filename, size, write, characterization, rank"

        if MaxResults <> -1 then
        Q.MaxRecords = MaxResults
        end if

        Dim FormScope;
        FormScope = "/"

        if FormScope <> "\" then
        Util.AddScopeToQuery Q, FormScope, "deep"
        end if

        .....

        [2] change your scope to "/foldername/"

        [3] to get vpath and characterization

        set RS = Q.CreateRecordSet("nonsequential")

        myVpath = RS("vpath")

        myCharaterization = RS("characterization") or Server.HTMLEncode(RS("characterization"))

        Hope that helps.
        • thanks for your ideas. actually i change strmyscope=" 'SHALLOW TRAVERSAL OF ""/my folder/""' "