zoukankan
html css js c++ java
Index Server 1
由于网上的实例太多这就不对index server进行过多的描述,仅仅对代码中的极个别注意点进行说明,希望后来的和我一样走.net的人少些弯路.
string
constr
=
"
PROVIDER=MSIDXS;DATA SOURCE=IndexData
"
;
//
调用msidxs索引服务,并指定起编录(IndexData)
OleDbConnection con
=
new
OleDbConnection(constr);
try
{
//
通过Scope来指定查找范围
strOle
=
"
SELECT Rank,FileName, Create, Access, Path FROM SCOPE('
"
+
strWhichMethod
+
"
\
""
+strDataPath+
"
\
"
') where contains('xml')
"
;
OleDbCommand cmd
=
new
OleDbCommand(strOle,con);
con.Open();
OleDbDataReader OleDaRead
=
cmd.ExecuteReader(CommandBehavior.CloseConnection);
while
(OleDaRead.Read())
{
arrFileName.Add( OleDaRead[
"
FileName
"
].ToString());
}
cmd.Dispose();
}
catch
(Exception E)
{
Debug.Write(E.Message);
}
finally
{
con.Close();
}
请注意 data souce 是指你在索引服务里自己创建的一个索引编录.这里的scope可以自己选择索引方法,比如在顶级目录下或在虚拟录下等,一共有四种在这里我都将其写为变量;各位自己调用scope提供的方法.已上就是我对index server的一点补充.
查看全文
相关阅读:
Android Library projetcts cannot be exported.
技术阅读记录(一)
ASP.NET MVC Model绑定(五)
Linux 高速操作IOport
This version of the rendering library is more recent than your version of IntelliJ IDEA.
WPF使用RoutedCommand自己定义命令
AutoLayout具体解释+手把手实战
JNI之——Can't load IA 32-bit .dll on a AMD 64-bit platform错误的解决
9.Nexus私服安装配置
Alcatraz:管理Xcode插件
原文地址:https://www.cnblogs.com/twilight/p/1401197.html
最新文章
jmeter --- 测试计划里的元件
jmeter ---处理Cookie与Session
Jmeter ----关于上传图片接口
postman --发送json请求
postman--- form-data、x-www-form-urlencoded、raw、binary分别如何设置
jmeter --HTTP属性管理器
hadoop-11-ambari-server安装
hadoop-10-创建yum资源库
hadoop-09-安装资源上传
hadoop-08-关闭THP服务
热门文章
hadoop-07-ntp服务检查
hadoop-06-http服务
hadoop-05-mysql修改密码
hadoop-04-mysql安装
hadoop-03-安装java
hadoop-02-关闭防火墙
One-Based Arithmetic
myeclipse配置SVN插件
Jenkins具体安装与构建部署使用教程
Oracle集合操作
Copyright © 2011-2022 走看看