安装.NET
下载这个项目。
跑步
cd FTServer
dotnet run -c Release
打开http://127.0.0.1:5066/
按 [Ctrl+C] 关闭。
输入完整 URL 以索引页面,然后搜索。
通过重新索引页面来向前移动页面。
[Word1 Word2 Word3] => 文本有Word1 、 Word2和Word3
["Word1 Word2 Word3"] => 文本整体具有“Word1 Word2 Word3”
搜索 [https] 或 [http] => 获取几乎所有页面
下载 Visual Studio 代码
iBox数据库
角度锐利
语义UI
结果根据类 PageText中的id()编号进行降序排列。
一个页面有许多页面文本。如果不需要多个Text,修改Html.getDefaultTexts(Page) ,仅返回一个PageText(仅页面描述文本, Config.DescriptionOnly=true )。
Page.GetRandomContent() 方法用于保持 Search-Page-Content 始终变化,不会影响真正的 PageText 顺序。
使用ID号来控制顺序,而不是将所有页面加载到内存中。
搜索(...字符串关键字,长startId ,长计数)
startId => 从哪个ID(创建PageText时的id)开始,使用(startId=Long.MaxValue)从上往下读取
count => 要读取的记录,重要参数,查找速度取决于该参数,而不是数据有多大。
将 startId 设置为搜索结果中的最后一个 id 减一
startId = search ( " keywords " , startId , count ) ;
nextpage_startId = startId - 1 // this 'minus one' has done inside search()
.. .
//read next page
search ( " keywords " , nextpage_startId , count )
大多数情况下,当用户到达网页末尾时,从客户端浏览器发布nextpage_startId,并设置默认的nextpage_startId=Long.MaxValue,在javascript中,大数字必须写为String(“'”+nextpage_startId +“'”)
打开
public Page Html . Get ( String url ) ;
设置您的私人网站文本
Page page = new Page ( ) ;
page . url = url ;
page . title = title ;
page . text = bodyText
page.. . = .. .
return page ;
从 FTServer/Code/Config.cs 设置索引只读缓存 (Readonly_MaxDBCount)。
[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
为什么 Tracker 会消耗我电脑上的资源?
[user@localhost ~ ]$ tracker daemon -k
[user@localhost project]$ tracker reset --hard
全文检索Java JSP版本移植