about summary refs log tree commit diff stats
path: root/internal/search/search.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/search/search.go')
-rw-r--r--internal/search/search.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/internal/search/search.go b/internal/search/search.go
index 9766294..bc77cea 100644
--- a/internal/search/search.go
+++ b/internal/search/search.go
@@ -50,14 +50,23 @@ func (index *ReadIndex) GetSource(ctx context.Context, name string) (*bleve.Sear
 		return nil, ctx.Err()
 	default:
 		if err != nil {
-			return nil, errors.WithMessagef(err, "failed to execute search to find source %s in index", name)
+			return nil, errors.WithMessagef(
+				err,
+				"failed to execute search to find source %s in index",
+				name,
+			)
 		}
 	}
 
 	return result, nil
 }
 
-func (index *ReadIndex) Search(ctx context.Context, source string, keyword string, from uint64) (*Result, error) {
+func (index *ReadIndex) Search(
+	ctx context.Context,
+	source string,
+	keyword string,
+	from uint64,
+) (*Result, error) {
 	sourceQuery := bleve.NewTermQuery(source)
 	userQuery := bleve.NewMatchQuery(keyword)
 	userQuery.Analyzer = "option_name"