mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 10:48:37 +00:00
[Feature] add precise search type for Elastic Search (#12869)
* feat: add type query parameters for specifying precise search * feat: add select dropdown in search box Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
@@ -73,12 +73,12 @@ func (w *wrappedIndexer) Delete(repoID int64) error {
|
||||
return indexer.Delete(repoID)
|
||||
}
|
||||
|
||||
func (w *wrappedIndexer) Search(repoIDs []int64, language, keyword string, page, pageSize int) (int64, []*SearchResult, []*SearchResultLanguages, error) {
|
||||
func (w *wrappedIndexer) Search(repoIDs []int64, language, keyword string, page, pageSize int, isMatch bool) (int64, []*SearchResult, []*SearchResultLanguages, error) {
|
||||
indexer, err := w.get()
|
||||
if err != nil {
|
||||
return 0, nil, nil, err
|
||||
}
|
||||
return indexer.Search(repoIDs, language, keyword, page, pageSize)
|
||||
return indexer.Search(repoIDs, language, keyword, page, pageSize, isMatch)
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user