Select the types of activity you want to include in your feed.
docs: some updates (#952)
Asked an agent to inspect the codebase and docs and update the docs to match reality more. I ended up not using all of its suggestions, but these are the ones that seem reasonable.
···7878 go install github.com/sourcegraph/zoekt/cmd/zoekt-webserver
7979 $GOPATH/bin/zoekt-webserver -index ~/.zoekt/
80808181-This will start a web server with a simple search UI at http://localhost:6070. See the [uuery syntax docs](doc/query_syntax.md)
8282-for more details on the query language.
8181+This will start a web server with a simple search UI at http://localhost:6070.
8282+See the [query syntax docs](doc/query_syntax.md) for more details on the query
8383+language.
8484+8585+If you start the web server with `-rpc`, it exposes a [simple JSON search
8686+API](doc/json-api.md) at `http://localhost:6070/api/search`.
83878484-If you start the web server with `-rpc`, it exposes a [simple JSON search API](doc/json-api.md) at `http://localhost:6070/search/api/search.
8888+The JSON API supports advanced features including:
8989+- Streaming search results (using the `FlushWallTime` option)
9090+- Alternative BM25 scoring (using the `UseBM25Scoring` option)
9191+- Context lines around matches (using the `NumContextLines` option)
85928693Finally, the web server exposes a gRPC API that supports [structured query objects](query/query.go) and advanced search options.
8794
+8-1
doc/design.md
···142142 * branch masks
143143 * metadata (repository name, index format version, etc.)
144144145145-In practice, the shard size is about 3x the corpus (size).
145145+In practice, the shard size is about 3.5x the corpus size, composed of
146146+original content, posting lists, and other metadata.
146147147148The format uses uint32 for all offsets, so the total size of a shard
148149should be below 4G. Given the size of the posting data, this caps
···178179For the latter, it is necessary to find symbol definitions and other
179180sections within files on indexing. Several (imperfect) programs to do
180181this already exist, eg. `ctags`.
182182+183183+Zoekt also supports an alternative BM25-based scoring algorithm that can be
184184+enabled with `UseBM25Scoring`. When enabled, each match in a file is treated
185185+as a term, and an approximation to BM25 is computed. This is useful for
186186+multi-term queries, better handling of term frequency, and appropriate
187187+document length normalization.
181188182189183190Query language
+3-1
doc/faq.md
···111111112112The search server should have local SSD to store the index file (which
113113is 3.5x the corpus size), and have at least 20% more RAM than the
114114-corpus size.
114114+corpus size. For optimal performance with large codebases, consider
115115+using machines with ample CPU cores, as search operations can be
116116+parallelized across shards.
115117116118## Can I index multiple branches?
117119
+41-1
doc/query_syntax.md
···10101111A query is made up of expressions. An **expression** can be:
1212- A negation (e.g., `-`),
1313-- A field (e.g., `repo:`).
1313+- A field (e.g., `repo:`),
1414- A grouping (e.g., parentheses `()`),
15151616Logical `OR` operations combine multiple expressions. The **`AND` operator is implicit**, meaning multiple expressions written together will be automatically treated as `AND`.
···86868787---
88888989+## Special Query Types
9090+9191+### Filtering by Repository Type
9292+9393+Zoekt supports filtering repositories by various attributes:
9494+9595+```plaintext
9696+public:yes archived:no fork:no
9797+```
9898+9999+This finds repositories that are public, not archived, and not forks.
100100+101101+### Result Type Control
102102+103103+The `type:` operator controls what kind of results are returned:
104104+105105+```plaintext
106106+type:repo content:config
107107+```
108108+109109+This returns repository names instead of file matches. Valid values include:
110110+- `filematch` - Returns file content matches (default)
111111+- `filename` - Returns only matching filenames
112112+- `repo` - Returns only repository names
113113+114114+---
115115+89116## Special Query Values
9011791118- **Boolean Values**:
···108135 ```plaintext
109136 content:/foo.*bar/
110137 ```
138138+139139+---
140140+141141+## Case Sensitivity
142142+143143+Zoekt supports three case sensitivity modes:
144144+145145+- `case:yes` - Exact case matching
146146+- `case:no` - Case-insensitive matching
147147+- `case:auto` - Automatically detect based on pattern (default)
148148+149149+In auto mode, if the pattern contains uppercase letters, the search will be
150150+case-sensitive; otherwise, it will be case-insensitive.
111151112152---
113153