Comments (11)
Still, can’t help a feeling binary file skipping merits to be done via some command line switch, like -maxlinelen defaulting to 2000.
You might be interested in using my fork that implements this and some other options https://github.com/junkblocker/codesearch .
from codesearch.
The files that are skipped generally are thought to be binary files -- those with very long lines or too many invalid utf8 characters.
from codesearch.
Here is how the file skipping is decided:
// Tuning constants for detecting text files.
// A file is assumed not to be text files (and thus not indexed)
// if it contains an invalid UTF-8 sequences, if it is longer than maxFileLength
// bytes, if it contains a line longer than maxLineLen bytes,
// or if it contains more than maxTextTrigrams distinct trigrams.
const (
maxFileLen = 1 << 30
maxLineLen = 2000
maxTextTrigrams = 20000
)
Line 88 in a45d81b
When I faced the same file skipping issue, I just changed maxLineLen
to 10000
and recompiled and reindexed and everything worked just fine. Quick and dirty hack as it is.
Still, can’t help a feeling binary file skipping merits to be done via some command line switch, like -maxlinelen
defaulting to 2000.
from codesearch.
@nmklong go build
, go install
as described in https://golang.org/cmd/go/#hdr-Compile_packages_and_dependencies after changing the source file locally.
I’m not quite sure about that, but go get -u
might well undo any changes you made locally.
from codesearch.
You can run with -logskip
flag to see why the files were skipped.
from codesearch.
@junkblocker I ran csearch -logskip "terms"
but it's saying it's an incorrect flag
from codesearch.
The flag applies at indexing time to cindex
and not at search time to csearch
.
from codesearch.
@junkblocker Tried cindex -logskip ./
but it's still saying incorrect flag
from codesearch.
@junkblocker: ah, good to know, thanks!
from codesearch.
@rns thanks for that, but a noob question: how to recompile go after modifying the code locally?
I tried go get -u ~/localgocode/src/github.com/google/codesearch
but it didn't work, ~/localgocode is my GOPATH
from codesearch.
@rns thanks for your great help! got it working now
from codesearch.
Related Issues (20)
- Exclude subdirectories
- How to install HOT 1
- Support text files compressed with gzip, bzip2 and xz HOT 2
- Couldn't install HOT 1
- Possible to scan git?
- How to use cgrep? HOT 1
- [Maintainance status] Does anyone own this? HOT 3
- index can't be larger than 4GB
- Color matched patterns in csearch output
- Enable multiline searches
- What will be returned by getSmallest(…) method when you run this program?
- What will be returned by getSmallest(…) method when you run this program?
- cindex is silently ignoring some text files and there's no way to tell why HOT 3
- Fix temporary file deletion not working on Windows
- Esew codes
- index/read line 200 is a bug
- Coding
- facebook account recovery
- Filter for filetype and exact words
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codesearch.