我听说过Lucene.Net,我听说过Apache Tika.问题是 - 如何使用C#和Java索引这些文档?我认为问题在于没有.Net等效的Tika从这些文档类型中提取相关文本.
更新 - 2011年2月5日
基于给定的响应,似乎目前不是Tika 的原生 .Net等价物.提到了两个有趣的项目,每个项目各有趣:
鉴于上述两个项目,我看到了几个选项.为了提取文本,我可以a)使用Omega正在使用的相同组件或b)使用IKVM来运行Tika.对我来说,选项b)看起来更干净,因为只有2个依赖项.
有趣的是,现在有几个搜索引擎可能可以从.Net使用.有Xapian,Lucene.Net甚至Lucene(使用IKVM).
更新 - 2011年2月7日
另一个答案是建议我查看ifilters.事实证明,这就是MS用于Windows搜索,因此Office ifilter随时可用.此外,还有一些PDF ifilters.缺点是它们是在非托管代码中实现的,因此使用COM互操作是必要的.我在DotLucene.NET档案中找到了以下代码snippit(不再是活动项目):
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
namespace IFilter
{
[Flags]
public enum IFILTER_INIT : uint
{
NONE = 0,
CANON_PARAGRAPHS = 1,
HARD_LINE_BREAKS = 2,
CANON_HYPHENS = 4,
CANON_SPACES = 8,
APPLY_INDEX_ATTRIBUTES = 16,
APPLY_CRAWL_ATTRIBUTES = 256,
APPLY_OTHER_ATTRIBUTES = 32,
INDEXING_ONLY …Run Code Online (Sandbox Code Playgroud) 我正在尝试在我的webapp中创建一个停止按钮.webapp会为不同的文件创建批量快捷方式.我尝试过使用$.connection.shortcutHub.stop()但是这会出现错误Cannot read property 'shortcutHub' of undefined(anonymous function)
代码如下.stop单击按钮后,我需要停止连接.停止按钮的ID是stopButton.
$(document).ready(function () {
// initialize the connection to the server
var progressNotifier = $.connection.shortcutHub;
// client-side sendMessage function that will be called from the server-side
progressNotifier.client.sendMessage = function (message, percent) {
// update progress
UpdateMessage(message, percent);
};
progressNotifier.client.redo = function () {
redo();
};
progressNotifier.client.success = function () {
success();
};
progressNotifier.client.fail = function () {
fail();
};
// establish the connection to the server …Run Code Online (Sandbox Code Playgroud)