Skip to content

Commit

Permalink
Do not filter hidden files by default
Browse files Browse the repository at this point in the history
  • Loading branch information
aduffeck committed Nov 9, 2022
1 parent 5823161 commit ad06174
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions services/search/pkg/search/index/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,9 @@ func (i *Index) Move(id, newParentID *sprovider.ResourceId, fullPath string) err
func (i *Index) Search(ctx context.Context, req *searchsvc.SearchIndexRequest) (*searchsvc.SearchIndexResponse, error) {
deletedQuery := bleve.NewBoolFieldQuery(false)
deletedQuery.SetField("Deleted")
hiddenQuery := bleve.NewBoolFieldQuery(false)
hiddenQuery.SetField("Hidden")
query := bleve.NewConjunctionQuery(
bleve.NewQueryStringQuery(req.Query),
deletedQuery, // Skip documents that have been marked as deleted
hiddenQuery, // Skip documents that are hidden
)
if req.Ref != nil {
query = bleve.NewConjunctionQuery(
Expand Down
2 changes: 1 addition & 1 deletion services/search/pkg/search/index/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ var _ = Describe("Index", func() {
err := i.Add(ref, ri)
Expect(err).ToNot(HaveOccurred())

assertDocCount(ref.ResourceId, `Name:*hidden*`, 0)
assertDocCount(ref.ResourceId, `Name:*hidden* +Hidden:true`, 0)
})

Context("with a file in the root of the space", func() {
Expand Down

0 comments on commit ad06174

Please sign in to comment.