You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/code-search/code-navigation/inference_configuration.mdx
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,8 @@ To **add** additional behaviors, you can create and register a new **recognizer*
40
40
41
41
A _path recognizer_ is a concrete recognizer that advertises a set of path _globs_ it is interested in, then invokes its `generate` function with matching paths from a repository. In the following, all files matching `Snek.module` (`Snek.module`, `proj/Snek.module`, `proj/sub/Snek.module`, etc) are passed to a call to `generate` (if non-empty). The generate function will then return a list of indexing job descriptions. The [guide for auto-indexing jobs configuration](/code-search/code-navigation/auto_indexing_configuration#keys-1) gives detailed descriptions on the fields of this object.
42
42
43
+
The ordering of paths and limits are defined in the [Ordering guarantees and limits](#ordering-guarantees-and-limits) section.
44
+
43
45
```lua
44
46
localpath=require("path")
45
47
localpattern=require("sg.autoindex.patterns")
@@ -213,3 +215,37 @@ This library defines the following two JSON utility functions:
213
215
### `fun`
214
216
215
217
[Lua Functional](https://github.com/luafun/luafun/tree/cb6a7e25d4b55d9578fd371d1474b00e47bd29f3#lua-functional) is a high-performance functional programming library accessible via `local fun = require("fun")`. This library has a number of functional utilities to help make recognizer code a bit more expressive.
218
+
219
+
## Ordering guarantees and limits
220
+
221
+
Sourcegraph enforces several limits to avoid inference timeouts and ever-growing auto-indexing queues. These limits apply for a single round of inference for a single repository, combined across all recognizers, including any implicitly included Sourcegraph recognizers.
222
+
223
+
Limit | Default value
224
+
:-----|-------------:
225
+
The number of auto-indexing jobs inferred | 100
226
+
The number of total paths passed to the inference script's `generate` functions as the second argument `paths` | 500
227
+
The number of total paths with contents passed to the inference script's `generate` functions as the third argument `contents_by_paths` | 100
228
+
Maximum size limit for file contents, in bytes | 1 MiB
229
+
230
+
<Callouttype="note">Please reach out to Sourcegraph support if you'd like to change these limits.</Callout>
0 commit comments