1 Star 7 Fork 4

iBoxDB / ftserver-cs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Full Text Search Engine Server for CSharp

User Guide

Setup

  1. Install NET6.0

  2. Download this Project.

  3. Run

cd FTServer
dotnet run -c Release
  1. Open http://127.0.0.1:5066/

  2. Press [Ctrl+C] to shut down.

Input a Full URL to index the Page, then search.

Move page forward by re-indexing the page.

Search Format

[Word1 Word2 Word3] => text has Word1 and Word2 and Word3

["Word1 Word2 Word3"] => text has "Word1 Word2 Word3" as a whole

Search [https] or [http] => get almost all pages

Developer Guide

Download Visual Studio Code

Dependencies

iBoxDB

AngleSharp

Semantic-UI

The Results Order

The results order based on the id() number in class PageText, descending order.

A Page has many PageTexts. if don't need multiple Texts, modify Html.getDefaultTexts(Page), returns only one PageText.

the Page.GetRandomContent() method is used to keep the Search-Page-Content always changing, doesn't affect the real PageText order.

Use the ID number to control the order instead of loading all pages to memory. Or load top 100 pages to memory then re-order it by favor.

Search Method

search (... String keywords, long startId, long count)

startId => which ID(the id when you created PageText) to start, use (startId=Long.MaxValue) to read from the top, descending order

count => records to read, important parameter, the search speed depends on this parameter, not how big the data is.

Next Page

set the startId as the last id from the results of search minus one

startId = search( "keywords", startId, count);
nextpage_startId = startId - 1 // this 'minus one' has done inside search()
...
//read next page
search("keywords", nextpage_startId, count)

mostly, the nextpage_startId is posted from client browser when user reached the end of webpage, and set the default nextpage_startId=Long.MaxValue, in javascript the big number have to write as String ("'" + nextpage_startId + "'")

Private Server

Open

public Page Html.Get(String url);

Set your private WebSite text

Page page = new Page();
page.url = url;
page.title = title;
page.text = bodyText
page... = ...
return page;

Set Maximum Opened Files

[user@localhost ~]$ cat /proc/sys/fs/file-max
803882
[user@localhost ~]$ ulimit -a | grep files
open files                      (-n) 500000
[user@localhost ~]$  ulimit -Hn
500000
[user@localhost ~]$ ulimit -Sn
500000
[user@localhost ~]$ 


$ vi /etc/security/limits.conf
*         hard    nofile      500000
*         soft    nofile      500000
root      hard    nofile      500000
root      soft    nofile      500000


[user@localhost ~]$ firewall-cmd --add-port=5066/tcp --permanent

//Stop OS File Indexing, Faster
[user@localhost ~]$ tracker daemon -k

//Remove cache, it has a slow db inside
[user@localhost ~]$ rm -rf .cache/tracker/

More

Transplant from Full Text Search Java JSP Version


空文件

简介

多国语言支持全文搜索引擎服务器 C# .NET Core 版本,原创搜索引擎。 展开 收起
C# 等 2 种语言
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C#
1
https://gitee.com/iboxdb/ftserver-cs.git
git@gitee.com:iboxdb/ftserver-cs.git
iboxdb
ftserver-cs
ftserver-cs
master

搜索帮助