diff options
-rw-r--r-- | internal/index/search.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/index/search.go b/internal/index/search.go index 9063f20..a3c05da 100644 --- a/internal/index/search.go +++ b/internal/index/search.go @@ -148,6 +148,12 @@ func (index *ReadIndex) Search( query.AddMust( setField(bleve.NewTermQuery(source.Key), "Source"), ) + } else { + q := bleve.NewTermQuery("nixpkgs") + q.SetField("Source") + q.SetBoost(-100) + + query.AddShould(q) } // ...and boost it if it matches any of these |