zoekt: 204 files / 1774 matches / 5.17ms neogrok: 20 files / 143 matches

neogrokdoc/faq.md 5 matches | Markdown | №1

5 Software engineering is more about reading than writing code, and part6 of this process is finding the code that you should read. If you are7 working on a large project, then finding source code through
37 approximate query, and then refine it based on results you got. For38 this to work, you need the following features:39
56 * Coverage: `zoekt` comes with tools to mirror parts of common Git57 hosting sites. `cs.bazel.build` uses this to index most of the58 Google authored open source software on github.com and
61 * Speed: `zoekt` uses an index based on positional trigrams. For rare62 strings, eg. `nienhuys`, this can yield results in milliseconds when the63 operating system caches are warm.
76 77 ## How does this compare to `grep -r`?78

neogrokinternal/e2e/testdata/assets_are_not_configured_for_this_binary.txt 2 matches | Text | №2

1 queryString: assets are not configured for this binary2 query: (and substr:"assets" substr:"are" substr:"not" substr:"configured" substr:"for" substr:"this" substr:"binary")3 targetRank: 1

neogrokapi.go 51 matches | Go | №3

3 // Licensed under the Apache License, Version 2.0 (the "License");4 // you may not use this file except in compliance with the License.5 // You may obtain a copy of the License at
84 85 // RepositoryID is a Sourcegraph extension. This is the ID of Repository in86 // Sourcegraph.
163 164 // Ranges is a set of matching ranges within this chunk. Each range is relative165 // to the beginning of the file (not the beginning of Content).
171 172 // FileName indicates whether this match is a match on the file name, in173 // which case Content will contain the file name.
180 181 // Score is the overall relevance score of this chunk.182 Score float64

neogrokLICENSE 17 matches | Text | №4

9 "License" shall mean the terms and conditions for use, reproduction,10 and distribution as defined by Sections 1 through 9 of this document.11
16 other entities that control, are controlled by, or are under common17 control with that entity. For the purposes of this definition,18 "control" means (i) the power, direct or indirect, to cause the
23 "You" (or "Your") shall mean an individual or Legal Entity24 exercising permissions granted by this License.25
43 represent, as a whole, an original work of authorship. For the purposes44 of this License, Derivative Works shall not include works that remain45 separable from, or merely link (or bind by name) to the interfaces of,
52 or by an individual or Legal Entity authorized to submit on behalf of53 the copyright owner. For the purposes of this definition, "submitted"54 means any form of electronic, verbal, or written communication sent

neogrokREADME.md 7 matches | Markdown | №5

9 10 **Note:** This has been the maintained source for Zoekt since 2017, when it was forked from the11 original repository [github.com/google/zoekt](https://github.com/google/zoekt).
39 40 Zoekt supports indexing and searching repositories on the command line. This is most helpful41 for simple local usage, or for testing and development.
98 99 This will fetch all repos under 'github.com/apache', then index the repositories. The indexserver takes care of100 periodically fetching and indexing new data, and cleaning up logfiles. See [config.go](cmd/zoekt-indexserver/config.go)101 for more details on this configuration.102
107 108 This will start a web server with a simple search UI at http://localhost:6070.109 See the [query syntax docs](doc/query_syntax.md) for more details on the query

neogrokweb/api.go 3 matches | Go | №6

3 // Licensed under the Apache License, Version 2.0 (the "License");4 // you may not use this file except in compliance with the License.5 // You may obtain a copy of the License at
55 Language string56 // If this was a duplicate result, this will contain the file57 // of the first index.

neogrokmarshal.go 1 match | Go | №7

46 47 // We calculate this up front so when decoding we only need to allocate the48 // underlying array once.

neogrokweb/doc.go 1 match | Go | №8

1 // Licensed under the Apache License, Version 2.0 (the "License");2 // you may not use this file except in compliance with the License.3 // You may obtain a copy of the License at

neogrokapi_proto.go 2 matches | Go | №9

3 // Licensed under the Apache License, Version 2.0 (the "License");4 // you may not use this file except in compliance with the License.5 // You may obtain a copy of the License at
40 Debug: p.GetDebug(),41 FileName: string(p.GetFileName()), // Note: 🚨Warning, this filename may be a non-UTF8 string.42 Repository: p.GetRepository(),

neogrokindex/toc.go 5 matches | Go | №10

3 // Licensed under the Apache License, Version 2.0 (the "License");4 // you may not use this file except in compliance with the License.5 // You may obtain a copy of the License at
49 // compatibility. For example, if a new way to encode filenameNgrams on disk is50 // added using a new section but the old one is retained, this would only bump51 // FeatureVersion, since the previous version can read the file and ignore the
57 // longer valid.58 // In this way, compatibility with arbitrary version offsets can be indicated.59
106 func (t *indexTOC) sections() []section {107 // This old sections list is only needed to maintain backwards compatibility,108 // and can be removed when a migration to tagged sections is complete.109 return []section{110 // This must be first, so it can be reliably read across111 // file format versions.

neogrokcmd/flags.go 1 match | Go | №11

3 // Licensed under the Apache License, Version 2.0 (the "License");4 // you may not use this file except in compliance with the License.5 // You may obtain a copy of the License at

neogrokquery/doc.go 1 match | Go | №12

1 // Licensed under the Apache License, Version 2.0 (the "License");2 // you may not use this file except in compliance with the License.3 // You may obtain a copy of the License at

neogrokdoc/ctags.md 1 match | Markdown | №13

13 14 From this version on, universal ctags will be called using seccomp,15 which guarantees that security problems in ctags cannot escalate to

neogrokweb/server.go 5 matches | Go | №14

3 // Licensed under the Apache License, Version 2.0 (the "License");4 // you may not use this file except in compliance with the License.5 // You may obtain a copy of the License at
139 140 // Version string for this server.141 Version string
144 // page. For example, when serving on "search.myproject.org"145 // we could add "r:myproject" automatically. This allows a146 // single instance to serve as search engine for multiple
149 150 // This should contain the following templates: "repolist"151 // (for the repo search result page), "result" for
265 // We need to use WithUnsafeContext here because we want to perform a full266 // search returning results. The result of this search is not used for anything267 // other than determining if the server is healthy.

neogrokindex/bits.go 5 matches | Go | №15

3 // Licensed under the Apache License, Version 2.0 (the "License");4 // you may not use this file except in compliance with the License.5 // You may obtain a copy of the License at
98 // more runes than bytes. A sufficiently long mixed suffix therefore proves99 // the candidate span fits without walking either slice. In practice this100 // keeps ordinary mismatches constant-time and reserves the exact scan below
393 //394 // This is very rarely a slight pessimization on repos where there are frequent395 // non-ASCII characters.
421 //422 // It does this by finding the nearest point to interpolate from in the map.423 func (m runeOffsetMap) lookup(runeOffset uint32) (uint64, uint32) {
431 // but we want to find the *last* index for which the predicate is true.432 // This involves some work to reverse the index directions.433 idx := sort.Search(slen, func(i int) bool {

neogrokindex/read.go 9 matches | Go | №16

3 // Licensed under the Apache License, Version 2.0 (the "License");4 // you may not use this file except in compliance with the License.5 // You may obtain a copy of the License at
161 } else {162 // TODO: Remove this branch when ReaderMinFeatureVersion >= 10163
441 // Sourcegraph specific: we support mutating metadata via an additional442 // ".meta" file. This is to support tombstoning. An additional benefit is we443 // can update metadata (such as Rank and Name) without re-indexing content.
507 func (d *indexData) verify() error {508 // This is not an exhaustive check: the postings can easily509 // generate OOB acccesses, and are expensive to check, but this lets us rule out510 // other sources of OOB access.

neogrokindex/eval.go 9 matches | Go | №17

3 // Licensed under the Apache License, Version 2.0 (the "License");4 // you may not use this file except in compliance with the License.5 // You may obtain a copy of the License at
89 // For index files that haven't been re-indexed by go-enry,90 // fall back to file-based matching and continue even if this91 // repo doesn't have the specific language present.
226 227 // 🚨 SECURITY: Skip documents that don't belong to the tenant. This check is228 // necessary to prevent leaking data across tenants.
324 // Important invariant for performance: finalCands is sorted by offset and325 // non-overlapping. gatherMatches respects this invariant and all later326 // transformations respect this.327 finalCands := d.gatherMatches(nextDoc, mt, known)

neogrokdoc/design.md 13 matches | Markdown | №18

82 83 * All the matches are returned in document order. This makes it84 straightforward to process compound boolean queries with AND and OR.
94 95 Code usually is searched without regard for case. In this case, when96 we are looking for "abc", we look for occurrences of all the different
108 byte-index mapping. For corpuses that are completely ASCII (fairly109 normal for source code), we short-circuit this lookup.110
121 122 in this case, the index holds two versions of "x.java", the one123 present in "master" and "staging", and the one in the "stable" branch.124 125 With this technique, we can index many similar branches of a126 repository with little space overhead.

neogrokquery/bits.go 1 match | Go | №19

3 // Licensed under the Apache License, Version 2.0 (the "License");4 // you may not use this file except in compliance with the License.5 // You may obtain a copy of the License at

neogrokquery/query.go 4 matches | Go | №20

3 // Licensed under the Apache License, Version 2.0 (the "License");4 // you may not use this file except in compliance with the License.5 // You may obtain a copy of the License at
654 if _, ok := ch.(*Const); ok {655 // If q is the root query, then evaluating this to a const changes656 // the type of result we will return. However, the only case this657 // makes sense is `type:repo TRUE` to return all repos or658 // `type:file TRUE` to return all filenames. For other cases we659 // want to do this constant folding though, so we allow the660 // unexpected behaviour mentioned previously.