Skip to content

Commit

Permalink
Added new folder docs with config-options description on options. (#370)
Browse files Browse the repository at this point in the history
* Added new folder docs with config-options description on options.

* Peer review comment update
updated formatting for config options documentation and added link
in readme.

* readme link update

* link update

* Minor edits from code review

Co-authored-by: kayyapil <[email protected]>
Co-authored-by: ehrktia <[email protected]>
Co-authored-by: Salem <[email protected]>
  • Loading branch information
4 people authored Jan 24, 2021
1 parent 1702bcf commit 5b702c4
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ go get github.com/hound-search/hound/cmds/...
2. Create a config.json file and use it to list your repositories. Check out our [example-config.json](config-example.json)
to see how to set up various types of repositories. For example, we can configure Hound to search its own source code using
the config found in [default-config.json](default-config.json):

```json
{
"dbpath" : "db",
Expand All @@ -38,6 +39,8 @@ the config found in [default-config.json](default-config.json):
}
```


A complete list of available config options can be found [here](docs/config-options.md).
3. Run the Hound server with `houndd` in the same directory as your `config.json`. You should see output similar to:
```
2015/03/13 09:07:42 Searcher started for statsd
Expand Down
48 changes: 48 additions & 0 deletions docs/config-options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
- [ConfigOptions](#configoptions)
* [Git options](#git-options)
* [SVN options](#svn-options)
* [URL options](#url-options)



# Config Options
Most of Hound's behavior is defined by a single `config.json` configuration file. A list of its available options are provided below, along with their defaults.
keys used in the config json file are the options,description provides details about keys.Default values gives idea about value which can be used for the option.


ConfigOption | Description | Default Values
:------ | :----- | :-----
max-concurrent-indexers | defines the total number of indexers required to be used for indexing code | 2
health-check-uri | health check url for hound | `/healthz`
dbpath | absolute file path where the `config.json` file exists| `data`
title | Title used for the application | Hound
url-pattern | composed of base url and anchor values in form of key value pairs | n/a
vcs-config | holds the version control config, default VCS used in Hound is git.Other options for VCS are svn,mercurial,bitbucket,hg, etc.Refer to `config-example.json` to get the list of vcs and usage. Below tables provide detailed options list of each type of vcs | git
repos | holds the list of repos which are required to be indexed by Hound . Each Repo is added with reponame as a Json Key with options associated with repo as values similar to example provided in `config-example.json` | n/a

## Git Options
List of options associated with git vcs in repos

GitOptions | Description | Default Values
:------ | :----- | :-----
ms-between-polls | time interval to poll the repo url | 30s
detect-ref | used to determine branch | master branch
ref | used to provide reference for the branch for repo| n/a

## SVN Options

List of options available for SVN vcs in repos

SvnOptions | Descriptions| Default Values
:------ | :-----| :-----
username | user name for the svn repo | n/a
password | password to authenticate use for svn repo | n/a


## URL Options
Options for url used for repo link under repos

URLOptions | Description | Default Values
:------ | :--- | :-----
url-pattern | when provided used by Hound for config|`{url}/blob/{rev}/{path}{anchor}`
anchor | when provided used for vcs config| `#L{line}`

0 comments on commit 5b702c4

Please sign in to comment.