Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any easy way to eliminate files from being indexed / counted #104

Closed
NathanaelA opened this issue May 2, 2017 · 5 comments
Closed

Any easy way to eliminate files from being indexed / counted #104

NathanaelA opened this issue May 2, 2017 · 5 comments
Assignees

Comments

@NathanaelA
Copy link

I have no interest in having the "license", ".gitignore" and ".npmignore", and ".json" counted in the repo sizes, is there a easy way to have it ignore these file types.

@boyter
Copy link
Owner

boyter commented May 2, 2017

For the moment not LICENSE, but I will add that in.

For the others, change the searchcode.properties file line,

binary_extension_black_list=PRECANNEDBLACKLIST

to

binary_extension_black_list=PRECANNEDBLACKLIST,gitignore,npmignore,json

Then rebuild the index using "Recrawl & Rebuild Indexes" in the admin screen.

@boyter
Copy link
Owner

boyter commented May 2, 2017

Just to note, that will exclude them from being indexed as well. The count is based on the index so thats what this will actually achieve.

I have a branch to add reports to searchcode where these sort of things would be controlled at runtime, but that is probably a major release away at this point.

@NathanaelA
Copy link
Author

Yeah, I don't want them to show up at all; they really are pointless files for searching at least in the eco-system I'm working with. ;-)

@boyter
Copy link
Owner

boyter commented May 2, 2017

That will do it then. The blacklist is only by file extention at the moment, but the fact that is would pick up .gitignore and .npmignore is more of a hack.

TODO - Add filename filter.

@boyter boyter self-assigned this May 2, 2017
@boyter
Copy link
Owner

boyter commented May 4, 2017

Going to close this and merge with #105 as it is the same issue.

@boyter boyter closed this as completed May 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants