changed indexing buffer to save to ram not to file
This commit is contained in:
parent
918e1823df
commit
61266c461a
4 changed files with 155 additions and 62 deletions
13
init.go
13
init.go
|
@ -3,8 +3,6 @@ package main
|
|||
import (
|
||||
"flag"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
)
|
||||
|
||||
var config Config
|
||||
|
@ -109,16 +107,17 @@ func main() {
|
|||
return
|
||||
}
|
||||
|
||||
webCrawlerInit()
|
||||
|
||||
err := InitIndex()
|
||||
if err != nil {
|
||||
printErr("Failed to initialize index:", err)
|
||||
}
|
||||
|
||||
// Start periodic indexing (every 2 minutes)
|
||||
dataFilePath := filepath.Join(config.DriveCache.Path, "data_to_index.txt")
|
||||
startPeriodicIndexing(dataFilePath, 2*time.Minute)
|
||||
webCrawlerInit()
|
||||
|
||||
// No longer needed as crawled data are indexed imidietly
|
||||
// // Start periodic indexing (every 2 minutes)
|
||||
// dataFilePath := filepath.Join(config.DriveCache.Path, "data_to_index.txt")
|
||||
// startPeriodicIndexing(dataFilePath, 2*time.Minute)
|
||||
|
||||
printInfo("Indexer is enabled.")
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue