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

Add more tests and docs for issue indexer, add db indexer type for searching from database #6144

Merged
merged 5 commits into from Feb 21, 2019

Conversation

lunny
Copy link
Member

@lunny lunny commented Feb 21, 2019

This PR add more tests and docs for issue indexer and added a new indexer type db which will only search database table issue and comment via SQL like. It's not effective but for a small deployment is enough.

@lunny lunny added type/docs This PR mainly updates/creates documentation type/testing type/refactoring Existing code has been cleaned up. There should be no new functionality. labels Feb 21, 2019
@lunny lunny added this to the 1.8.0 milestone Feb 21, 2019
@lunny lunny changed the title add more tests and docs for issue indexer, add db indexer type for searching from database Add more tests and docs for issue indexer, add db indexer type for searching from database Feb 21, 2019
@codecov-io
Copy link

codecov-io commented Feb 21, 2019

Codecov Report

Merging #6144 into master will decrease coverage by <.01%.
The diff coverage is 38.02%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6144      +/-   ##
==========================================
- Coverage   38.85%   38.85%   -0.01%     
==========================================
  Files         352      354       +2     
  Lines       50049    50112      +63     
==========================================
+ Hits        19449    19472      +23     
- Misses      27784    27822      +38     
- Partials     2816     2818       +2
Impacted Files Coverage Δ
modules/indexer/issues/queue.go 0% <0%> (ø)
modules/indexer/issues/queue_channel.go 0% <0%> (ø) ⬆️
modules/indexer/issues/db.go 0% <0%> (ø)
modules/setting/indexer.go 100% <100%> (ø) ⬆️
modules/indexer/issues/indexer.go 59.63% <14.28%> (-3.12%) ⬇️
modules/indexer/issues/queue_disk.go 52.63% <66.66%> (+3.45%) ⬆️
models/issue.go 48.33% <79.31%> (+0.74%) ⬆️
models/repo_list.go 66.84% <0%> (-1.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0751153...bd0b743. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 21, 2019
@lunny
Copy link
Member Author

lunny commented Feb 21, 2019

Will fix #5798

- `REPO_INDEXER_ENABLED`: **false**: 是否启用代码搜索(启用后会占用比较大的磁盘空间)。
- `REPO_INDEXER_PATH`: **indexers/repos.bleve**: 用于代码搜索的索引文件路径。
- `UPDATE_BUFFER_LEN`: **20**: 代码索引请求的缓冲区长度。
- `MAX_FILE_SIZE`: **1048576**: 进行解析的源代码文件的最大长度,小于才索引。
Copy link
Member

@BetaCat0 BetaCat0 Feb 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest: 小于该值时才会索引, 或将“小于才索引去掉”。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 21, 2019
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 21, 2019
@lunny lunny merged commit 477ef46 into go-gitea:master Feb 21, 2019
@lunny lunny deleted the lunny/issue_indexer branch February 21, 2019 05:01
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/docs This PR mainly updates/creates documentation type/refactoring Existing code has been cleaned up. There should be no new functionality. type/testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants