C# Client API for Sphinx (support to 0.99)

Sphinx是一个非常优秀的开源的全文搜索引擎。下面是官方网站上对Sphinx的描述:

  • high indexing speed (upto 10 MB/sec on modern CPUs)
  • high search speed (avg query is under 0.1 sec on 2-4 GB text collections)
  • high scalability (upto 100 GB of text, upto 100 M documents on a single CPU)
  • supports distributed searching (since v.0.9.6)
  • supports MySQL natively (MyISAM and InnoDB tables are both supported)
  • supports phrase searching
  • supports phrase proximity ranking, providing good relevance
  • supports English and Russian stemming
  • supports any number of document fields (weights can be changed on the fly)
  • supports document groups
  • supports stopwords
  • supports different search modes ("match all", "match phrase" and "match any" as of v.0.9.5)
  • generic XML interface which greatly simplifies custom integration
  • pure-PHP (ie. NO module compiling etc) search client API

目前官方提供的API支持的语言有:PHP, Python, Java, Ruby, pure C,没有C# ,只有个连接指到第三方的API。可惜的是这个作者似乎很久没有update了,没有支持最新的版本。

由于工作中要用Sphinx,没办法,只好自己动手丰衣足食了,好在蛮简单的。先下载了那个C#版的API,然后对着PHP版的API,把它更新到了最新版的(我改的时候是ver. 0.99)。在项目里用了一段时间了,没出什么错,应该没什么问题

API

原文地址:https://www.cnblogs.com/FMax/p/1734730.html