安裝.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版本移植