Skip to content

Commit

Permalink
Merge pull request #63 from opencloud-eu/search-rename
Browse files Browse the repository at this point in the history
Rebrand search
  • Loading branch information
rhafer authored Jan 20, 2025
2 parents c99cf22 + 6bab922 commit 56b75f3
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 17 deletions.
14 changes: 7 additions & 7 deletions services/search/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The search service is responsible for metadata and content extraction, stores th
* The search service consumes events and does not block other tasks.
* When looking for content extraction, [Apache Tika - a content analysis toolkit](https://tika.apache.org) can be used but needs to be installed separately.

Extractions are stored as index via the search service. Consider that indexing requires adequate storage capacity - and the space requirement will grow. To avoid filling up the filesystem with the index and rendering Infinite Scale unusable, the index should reside on its own filesystem.
Extractions are stored as index via the search service. Consider that indexing requires adequate storage capacity - and the space requirement will grow. To avoid filling up the filesystem with the index and rendering OpenCloud unusable, the index should reside on its own filesystem.

You can change the path to where search maintains its data in case the filesystem gets close to full and you need to relocate the data. Stop the service, move the data, reconfigure the path in the environment variable and restart the service.

Expand Down Expand Up @@ -39,7 +39,7 @@ Not all parts are supported, the following list gives an overview of parts that
* NEAR operator
* Date intervals

In the following [ADR](https://github.com/owncloud/ocis/blob/docs/ocis/adr/0020-file-search-query-language.md) you can read why we chose KQL.
In the following [ADR](https://github.com/opencloud-eu/opencloud/blob/docs/ocis/adr/0020-file-search-query-language.md) you can read why we chose KQL.

## Extraction Engines

Expand All @@ -54,7 +54,7 @@ The search service is able to manage and retrieve many types of information. For

### Basic Extractor

This extractor is the most simple one and just uses the resource information provided by Infinite Scale. It does not do any further analysis. The following fields are included in the index: `Name`, `Size`, `MimeType`, `Tags`, `Mtime`.
This extractor is the most simple one and just uses the resource information provided by OpenCloud. It does not do any further analysis. The following fields are included in the index: `Name`, `Size`, `MimeType`, `Tags`, `Mtime`.

### Tika Extractor

Expand All @@ -74,7 +74,7 @@ When extracting content, you can specify whether [stop words](https://en.wikiped

When using the Tika container and docker-compose, consider the following:

* See the [ocis_full](https://github.com/owncloud/ocis/tree/master/deployments/examples/ocis_full) example.
* See the [opencloud_full](https://github.com/opencloud-eu/opencloud/tree/master/deployments/examples/opencloud_full) example.
* Containers for the linked service are reachable at a hostname identical to the alias or the service name if no alias was specified.

If using the `tika` extractor, make sure to also set `FRONTEND_FULL_TEXT_SEARCH_ENABLED` in the frontend service to `true`. This will tell the webclient that full-text search has been enabled.
Expand Down Expand Up @@ -121,7 +121,7 @@ This case is similar to [Folder created](#folder-created) with the difference th

#### File Version Restored

Since Infinite Scale is capable of storing multiple versions of the same file, the search service also needs to take care of those versions. When a file version is restored, the service starts to extract all needed information, creates the index and makes the file discoverable.
Since OpenCloud is capable of storing multiple versions of the same file, the search service also needs to take care of those versions. When a file version is restored, the service starts to extract all needed information, creates the index and makes the file discoverable.

#### Resource Tag Added

Expand All @@ -144,13 +144,13 @@ This is exactly the same as [File uploaded - synchronous](#file-uploaded---synch
The service includes a command-line interface to trigger re-indexing a space:

```shell
ocis search index --space $SPACE_ID
opencloud search index --space $SPACE_ID
```

It can also be used to re-index all spaces:

```shell
ocis search index --all-spaces
opencloud search index --all-spaces
```

Note that either `--space $SPACE_ID` or `--all-spaces` must be set.
Expand Down
4 changes: 2 additions & 2 deletions services/search/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ func GetCommands(cfg *config.Config) cli.Commands {
}
}

// Execute is the entry point for the ocis-search command.
// Execute is the entry point for the opencloud-search command.
func Execute(cfg *config.Config) error {
app := clihelper.DefaultApp(&cli.App{
Name: "search",
Usage: "Serve search API for oCIS",
Usage: "Serve search API for OpenCloud",
Commands: GetCommands(cfg),
})
return app.RunContext(cfg.Context, os.Args)
Expand Down
2 changes: 1 addition & 1 deletion services/search/pkg/config/reva.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package config

// Reva defines all available REVA configuration.
type Reva struct {
Address string `ocisConfig:"address" env:"OC_REVA_GATEWAY" desc:"The CS3 gateway endpoint." introductionVersion:"pre5.0"`
Address string `yaml:"address" env:"OC_REVA_GATEWAY" desc:"The CS3 gateway endpoint." introductionVersion:"pre5.0"`
}

// TokenManager is the config for using the reva token manager
Expand Down
2 changes: 1 addition & 1 deletion services/search/pkg/content/tika.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool"
"github.com/google/go-tika/tika"
libregraph "github.com/owncloud/libre-graph-api-go"

"github.com/opencloud-eu/opencloud/pkg/log"
"github.com/opencloud-eu/opencloud/services/search/pkg/config"
libregraph "github.com/owncloud/libre-graph-api-go"
)

// Tika is used to extract content from a resource,
Expand Down
2 changes: 1 addition & 1 deletion services/search/pkg/content/tika_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import (
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
libregraph "github.com/owncloud/libre-graph-api-go"
"github.com/stretchr/testify/mock"

"github.com/opencloud-eu/opencloud/pkg/log"
conf "github.com/opencloud-eu/opencloud/services/search/pkg/config/defaults"
"github.com/opencloud-eu/opencloud/services/search/pkg/content"
contentMocks "github.com/opencloud-eu/opencloud/services/search/pkg/content/mocks"
libregraph "github.com/owncloud/libre-graph-api-go"
)

var _ = Describe("Tika", func() {
Expand Down
4 changes: 1 addition & 3 deletions services/search/pkg/engine/bleve.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ import (
"github.com/blevesearch/bleve/v2/mapping"
"github.com/blevesearch/bleve/v2/search/query"
storageProvider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"google.golang.org/protobuf/types/known/timestamppb"

"github.com/cs3org/reva/v2/pkg/errtypes"
"github.com/cs3org/reva/v2/pkg/storagespace"
"github.com/cs3org/reva/v2/pkg/utils"

libregraph "github.com/owncloud/libre-graph-api-go"
"google.golang.org/protobuf/types/known/timestamppb"

searchMessage "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/messages/search/v0"
searchService "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/services/search/v0"
Expand Down
2 changes: 1 addition & 1 deletion services/search/pkg/engine/bleve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (
"github.com/cs3org/reva/v2/pkg/storagespace"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
libregraph "github.com/owncloud/libre-graph-api-go"

searchmsg "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/messages/search/v0"
searchsvc "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/services/search/v0"
"github.com/opencloud-eu/opencloud/services/search/pkg/content"
"github.com/opencloud-eu/opencloud/services/search/pkg/engine"
"github.com/opencloud-eu/opencloud/services/search/pkg/query/bleve"
libregraph "github.com/owncloud/libre-graph-api-go"
)

var _ = Describe("Bleve", func() {
Expand Down
2 changes: 1 addition & 1 deletion services/search/pkg/search/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"github.com/cs3org/reva/v2/pkg/storage/utils/walker"
"github.com/cs3org/reva/v2/pkg/storagespace"
"github.com/cs3org/reva/v2/pkg/utils"
libregraph "github.com/owncloud/libre-graph-api-go"
"golang.org/x/sync/errgroup"
"google.golang.org/protobuf/types/known/fieldmaskpb"

Expand All @@ -30,7 +31,6 @@ import (
"github.com/opencloud-eu/opencloud/services/search/pkg/config"
"github.com/opencloud-eu/opencloud/services/search/pkg/content"
"github.com/opencloud-eu/opencloud/services/search/pkg/engine"
libregraph "github.com/owncloud/libre-graph-api-go"
)

const (
Expand Down

0 comments on commit 56b75f3

Please sign in to comment.