Skip to content

Commit faa4cbd

Browse files
committed
readme update
1 parent 0170b62 commit faa4cbd

File tree

5 files changed

+24
-54
lines changed

5 files changed

+24
-54
lines changed

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
11
<div align="center">
2+
<a href="https://danklinux.com">
3+
<img src="assets/danklogo.svg" alt="dsearch" width="200">
4+
</a>
25

3-
<img src="assets/dank.svg" alt="DANK" width="400">
6+
# dsearch
47

5-
</div>
6-
7-
<div align=center>
8+
### Fast, configurable filesystem search with fuzzy matching
89

10+
[![Documentation](https://img.shields.io/badge/docs-danklinux.com-9ccbfb?style=for-the-badge&labelColor=101418)](https://danklinux.com/docs/danksearch)
911
[![GitHub stars](https://img.shields.io/github/stars/AvengeMedia/danksearch?style=for-the-badge&labelColor=101418&color=ffd700)](https://github.com/AvengeMedia/danksearch/stargazers)
10-
[![GitHub License](https://img.shields.io/github/license/AvengeMedia/danksearch?style=for-the-badge&labelColor=101418&color=b9c8da)](https://github.com/AvengeMedia/danksearch/blob/master/LICENSE)
1112
[![GitHub release](https://img.shields.io/github/v/release/AvengeMedia/danksearch?style=for-the-badge&labelColor=101418&color=9ccbfb)](https://github.com/AvengeMedia/danksearch/releases)
1213
[![AUR version (git)](https://img.shields.io/aur/version/dsearch-git?style=for-the-badge&labelColor=101418&color=9ccbfb&label=AUR%20(git))](https://aur.archlinux.org/packages/dsearch-git)
13-
[![Ko-Fi donate](https://img.shields.io/badge/donate-kofi?style=for-the-badge&logo=ko-fi&logoColor=ffffff&label=ko-fi&labelColor=101418&color=f16061&link=https%3A%2F%2Fko-fi.com%2Favengemediallc)](https://ko-fi.com/avengemediallc)
14+
[![GitHub License](https://img.shields.io/github/license/AvengeMedia/danksearch?style=for-the-badge&labelColor=101418&color=b9c8da)](https://github.com/AvengeMedia/danksearch/blob/master/LICENSE)
1415

1516
</div>
1617

17-
# dsearch
18+
---
1819

1920
A configurable filesystem search service powered by [bleve](https://github.com/blevesearch/bleve) for Unix-based operating systems.
2021

22+
**[Full documentation →](https://danklinux.com/docs/danksearch)**
23+
24+
---
25+
2126
## Features
2227

2328
- **Indexing** - Indexes all files in specified paths

cmd/dsearch/main.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,6 @@ func runServe(cmd *cobra.Command, args []string) error {
249249
log.Infof("initial index build complete")
250250
}
251251
}()
252-
} else if cfg.AutoReindex && idx.ShouldReindex(cfg.ReindexIntervalHours) {
253-
log.Infof("auto-reindex triggered (interval: %d hours)", cfg.ReindexIntervalHours)
254-
go func() {
255-
if err := idx.ReindexAll(); err != nil {
256-
log.Errorf("auto-reindex failed: %v", err)
257-
}
258-
}()
259252
}
260253

261254
w, err := watcher.New(idx, cfg)

config.example.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ worker_count = 4
1717
# Index all file types (not just text files)
1818
index_all_files = true
1919

20-
# Auto re-index on startup if due (default: false)
21-
auto_reindex = false
22-
23-
# Re-index interval in hours (0 = disable periodic re-indexing)
24-
reindex_interval_hours = 24
25-
2620
# File extensions to extract text content from
2721
text_extensions = [
2822
".txt", ".md", ".go", ".py", ".js", ".ts",

internal/config/config.go

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@ type IndexPath struct {
2222
}
2323

2424
type Config struct {
25-
IndexPath string `toml:"index_path"`
26-
ListenAddr string `toml:"listen_addr"`
27-
MaxFileBytes int64 `toml:"max_file_bytes"`
28-
WorkerCount int `toml:"worker_count"`
29-
IndexPaths []IndexPath `toml:"index_paths"`
30-
TextExts []string `toml:"text_extensions"`
31-
IndexAllFiles bool `toml:"index_all_files"`
32-
AutoReindex bool `toml:"auto_reindex"`
33-
ReindexIntervalHours int `toml:"reindex_interval_hours"`
25+
IndexPath string `toml:"index_path"`
26+
ListenAddr string `toml:"listen_addr"`
27+
MaxFileBytes int64 `toml:"max_file_bytes"`
28+
WorkerCount int `toml:"worker_count"`
29+
IndexPaths []IndexPath `toml:"index_paths"`
30+
TextExts []string `toml:"text_extensions"`
31+
IndexAllFiles bool `toml:"index_all_files"`
3432

3533
RootDir string `toml:"root_dir,omitempty"`
3634
MaxDepth int `toml:"max_depth,omitempty"`
@@ -120,13 +118,11 @@ func Default() *Config {
120118
}
121119

122120
cfg := &Config{
123-
IndexPath: getDefaultIndexPath(),
124-
ListenAddr: ":43654",
125-
MaxFileBytes: 2 * 1024 * 1024,
126-
WorkerCount: workerCount,
127-
IndexAllFiles: true,
128-
AutoReindex: false,
129-
ReindexIntervalHours: 24,
121+
IndexPath: getDefaultIndexPath(),
122+
ListenAddr: ":43654",
123+
MaxFileBytes: 2 * 1024 * 1024,
124+
WorkerCount: workerCount,
125+
IndexAllFiles: true,
130126
IndexPaths: []IndexPath{
131127
{
132128
Path: home,

internal/indexer/indexer.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,24 +1078,6 @@ func (i *Indexer) SyncIncremental() error {
10781078
return nil
10791079
}
10801080

1081-
func (i *Indexer) ShouldReindex(intervalHours int) bool {
1082-
if intervalHours <= 0 {
1083-
return false
1084-
}
1085-
1086-
stats, err := i.loadStatsDocument()
1087-
if err != nil || stats == nil {
1088-
return true
1089-
}
1090-
1091-
if stats.LastIndexTime.IsZero() {
1092-
return true
1093-
}
1094-
1095-
interval := time.Duration(intervalHours) * time.Hour
1096-
return time.Since(stats.LastIndexTime) >= interval
1097-
}
1098-
10991081
func (i *Indexer) GetDocCount() (uint64, error) {
11001082
i.mu.RLock()
11011083
defer i.mu.RUnlock()

0 commit comments

Comments
 (0)