2008年5月26日

1 联合两个索引查询,已解决:
IndexSearcher[] searchers = new IndexSearcher[2]; 
  
searchers[0] = new IndexSearcher(m_indexpath);
searchers[1] = new IndexSearcher(m_outindexpath);

MultiSearcher multiSearcher = new MultiSearcher(searchers);

2,还有个进行多条件搜索 and 与 or 的操作————
用 MultiFieldQueryParser
建议重新封装
MultiFieldQueryParser.Parser(p[],d[],f[],analyer)  成or 与 and操作合一
或者 
        BooleanQuery thisQuery = new BooleanQuery();
        thisQuery.Add(query1,true,false);
        thisQuery.Add(query2, false, false);

posted @ 2008-05-26 17:08 隨風.NET 阅读(86) | 评论 (0)编辑
1,得到网页上的链接地址:
      string matchString = @"<a[^>]+href=\s*(?:'(?<href>[^']+)'|""(?<href>[^""]+)""|(?<href>[^>\s]+))\s*[^>]*>";
2,得到网页的标题:
      string matchString = @"<title>(?<title>.*)</title>";
3,去掉网页中的所有的html标记:
      string temp = Regex.Replace(html, "<[^>]*>", "");   //html是一个要去除html标记的文档
4, string matchString = @"<title>([\S\s\t]*?)</title>";
posted @ 2008-05-26 17:07 隨風.NET 阅读(28) | 评论 (0)编辑

导航

公告

希望自己能静心写点blog,很多内容来自与互联网,如果没有添加来源,可能是忘记了,还请谅解
<2008年5月>
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

统计

与我联系

搜索

 

常用链接

留言簿

我管理的小组

我参与的团队

随笔分类(5)

随笔档案(29)

links

最新随笔

积分与排名

最新评论

阅读排行榜

评论排行榜