From 6bab922c7c6c057dcac262ae91bd197fb90e3b73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Fri, 17 Jan 2025 09:12:36 +0100 Subject: [PATCH] Rebrand search --- services/search/README.md | 14 +++++++------- services/search/pkg/command/root.go | 4 ++-- services/search/pkg/config/reva.go | 2 +- services/search/pkg/content/tika.go | 2 +- services/search/pkg/content/tika_test.go | 2 +- services/search/pkg/engine/bleve.go | 4 +--- services/search/pkg/engine/bleve_test.go | 2 +- services/search/pkg/search/service.go | 2 +- 8 files changed, 15 insertions(+), 17 deletions(-) diff --git a/services/search/README.md b/services/search/README.md index fb53a3c8f1..cc67be7928 100644 --- a/services/search/README.md +++ b/services/search/README.md @@ -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. @@ -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 @@ -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 @@ -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. @@ -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 @@ -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. diff --git a/services/search/pkg/command/root.go b/services/search/pkg/command/root.go index a84fb38f57..43b42c4e93 100644 --- a/services/search/pkg/command/root.go +++ b/services/search/pkg/command/root.go @@ -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) diff --git a/services/search/pkg/config/reva.go b/services/search/pkg/config/reva.go index e4b9d66be5..a12c23f15d 100644 --- a/services/search/pkg/config/reva.go +++ b/services/search/pkg/config/reva.go @@ -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 diff --git a/services/search/pkg/content/tika.go b/services/search/pkg/content/tika.go index 5cc2cd4c93..06ae733fe4 100644 --- a/services/search/pkg/content/tika.go +++ b/services/search/pkg/content/tika.go @@ -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, diff --git a/services/search/pkg/content/tika_test.go b/services/search/pkg/content/tika_test.go index 742fd935a6..caa6d29b07 100644 --- a/services/search/pkg/content/tika_test.go +++ b/services/search/pkg/content/tika_test.go @@ -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() { diff --git a/services/search/pkg/engine/bleve.go b/services/search/pkg/engine/bleve.go index 72f7b6a29b..cb6b5981ff 100644 --- a/services/search/pkg/engine/bleve.go +++ b/services/search/pkg/engine/bleve.go @@ -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" diff --git a/services/search/pkg/engine/bleve_test.go b/services/search/pkg/engine/bleve_test.go index a3644dc7e8..3b7fbfb985 100644 --- a/services/search/pkg/engine/bleve_test.go +++ b/services/search/pkg/engine/bleve_test.go @@ -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() { diff --git a/services/search/pkg/search/service.go b/services/search/pkg/search/service.go index f227b5c86f..93202cb10a 100644 --- a/services/search/pkg/search/service.go +++ b/services/search/pkg/search/service.go @@ -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" @@ -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 (