package engine import ( "context" "errors" "fmt" "io" "regexp" "github.com/blevesearch/bleve/v2/search" storageProvider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" searchMessage "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/search/v0" searchService "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/search/v0" bleveEngine "github.com/owncloud/ocis/v2/services/search/pkg/engine/bleve" "github.com/owncloud/ocis/v2/services/search/pkg/config" "github.com/owncloud/ocis/v2/services/search/pkg/content" "github.com/owncloud/ocis/v2/services/search/pkg/query/bleve" ) // ErrResourceNotFound is returned when a resource is not present in the index. var ErrResourceNotFound = errors.New("entity not found") var queryEscape = regexp.MustCompile(`([` + regexp.QuoteMeta(`+=&|> "foo" // bleve: []string{"foo", "bar"} -> []string{"foo", "bar"} switch v := iv.(type) { case T: add(v) case []interface{}: for _, rv := range v { add(rv) } } return }