Skip to content

Commit

Permalink
api: add the excludeFiles query parameter
Browse files Browse the repository at this point in the history
Set the index search options ExcludeFileRegexp with this parameter
to allow excluding files from the search via a regexp.
  • Loading branch information
vrischmann committed Oct 2, 2016
1 parent 9b81292 commit a033417
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ func Setup(m *http.ServeMux, idx map[string]*searcher.Searcher) {
query := r.FormValue("q")
opt.Offset, opt.Limit = parseRangeValue(r.FormValue("rng"))
opt.FileRegexp = r.FormValue("files")
opt.ExcludeFileRegexp = r.FormValue("excludeFiles")
opt.IgnoreCase = parseAsBool(r.FormValue("i"))
opt.LinesOfContext = parseAsUintValue(
r.FormValue("ctx"),
Expand Down

0 comments on commit a033417

Please sign in to comment.