Skip to content

Commit e49284d

Browse files
author
Raffael Herrmann
committed
docs: add SEARCH_HIGHLIGHT_LIMIT configuration documentation
- Add Configuration Options section to README - Document SEARCH_HIGHLIGHT_LIMIT environment variable - Include usage examples for docker-compose and environment variables - Explain range, default value, and special -1 value for unlimited highlights
1 parent 6db5dea commit e49284d

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,44 @@ volumes:
9696
9797
**Important**: Update the left side (`./db.json`) to the actual path of your massCode database file. The volume is read-only to prevent accidental modifications to your data.
9898

99+
### Configuration Options
100+
101+
massCode Web supports several environment variables for customization:
102+
103+
#### SEARCH_HIGHLIGHT_LIMIT
104+
105+
Controls how many search matches are highlighted per snippet.
106+
107+
- **Default**: `3`
108+
- **Range**: `-1` to `9007199254740991` (JavaScript's `Number.MAX_SAFE_INTEGER`)
109+
- **Special value**: `-1` means highlight all matches (no limit)
110+
111+
**Examples:**
112+
113+
```yaml
114+
# Highlight only the first 5 matches per snippet
115+
environment:
116+
- SEARCH_HIGHLIGHT_LIMIT=5
117+
118+
# Highlight all matches (no limit)
119+
environment:
120+
- SEARCH_HIGHLIGHT_LIMIT=-1
121+
122+
# Use default (3 matches)
123+
# No environment variable needed
124+
```
125+
126+
**Usage with Docker Compose:**
127+
128+
```bash
129+
# Set via environment variable
130+
SEARCH_HIGHLIGHT_LIMIT=10 docker-compose up -d
131+
132+
# Or add to docker-compose.yml
133+
environment:
134+
- SEARCH_HIGHLIGHT_LIMIT=10
135+
```
136+
99137
### Manual Docker Run
100138

101139
```bash

0 commit comments

Comments
 (0)