Skip to content

Commit

Permalink
commit 1c8b353
Browse files Browse the repository at this point in the history
Merge: ea08dc9 fd4ec56
Author: Jörn Friedrich Dreyer <jfd@owncloud.com>
Date:   Mon May 2 19:25:07 2022 +0200

    Merge pull request #3635 from aduffeck/search

    Add initial version of the search extension
  • Loading branch information
butonic committed May 2, 2022
1 parent d0bcf62 commit dda2fd1
Show file tree
Hide file tree
Showing 16 changed files with 269 additions and 12 deletions.
28 changes: 28 additions & 0 deletions extensions/_includes/proxy-config-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,111 +26,139 @@ policies:
- name: ocis
routes:
- type: ""
method: ""
endpoint: /
backend: http://localhost:9100
service: ""
apache-vhost: false
- type: ""
method: ""
endpoint: /.well-known/
backend: http://localhost:9130
service: ""
apache-vhost: false
- type: ""
method: ""
endpoint: /konnect/
backend: http://localhost:9130
service: ""
apache-vhost: false
- type: ""
method: ""
endpoint: /signin/
backend: http://localhost:9130
service: ""
apache-vhost: false
- type: ""
method: ""
endpoint: /archiver
backend: http://localhost:9140
service: ""
apache-vhost: false
- type: regex
method: ""
endpoint: /ocs/v[12].php/cloud/(users?|groups)
backend: http://localhost:9110
service: ""
apache-vhost: false
- type: ""
method: ""
endpoint: /ocs/
backend: http://localhost:9140
service: ""
apache-vhost: false
- type: query
method: ""
endpoint: /remote.php/?preview=1
backend: http://localhost:9115
service: ""
apache-vhost: false
- type: ""
method: REPORT
endpoint: /remote.php/dav/
backend: http://localhost:9115
service: ""
apache-vhost: false
- type: ""
method: ""
endpoint: /remote.php/
backend: ""
service: ocdav
apache-vhost: false
- type: ""
method: ""
endpoint: /dav/
backend: ""
service: ocdav
apache-vhost: false
- type: ""
method: ""
endpoint: /webdav/
backend: ""
service: ocdav
apache-vhost: false
- type: ""
method: ""
endpoint: /status.php
backend: ""
service: ocdav
apache-vhost: false
- type: ""
method: ""
endpoint: /index.php/
backend: ""
service: ocdav
apache-vhost: false
- type: ""
method: ""
endpoint: /apps/
backend: ""
service: ocdav
apache-vhost: false
- type: ""
method: ""
endpoint: /data
backend: http://localhost:9140
service: ""
apache-vhost: false
- type: ""
method: ""
endpoint: /app/
backend: http://localhost:9140
service: ""
apache-vhost: false
- type: ""
method: ""
endpoint: /graph/
backend: http://localhost:9120
service: ""
apache-vhost: false
- type: ""
method: ""
endpoint: /graph-explorer
backend: http://localhost:9135
service: ""
apache-vhost: false
- type: ""
method: ""
endpoint: /api/v0/accounts
backend: http://localhost:9181
service: ""
apache-vhost: false
- type: ""
method: ""
endpoint: /accounts.js
backend: http://localhost:9181
service: ""
apache-vhost: false
- type: ""
method: ""
endpoint: /api/v0/settings
backend: http://localhost:9190
service: ""
apache-vhost: false
- type: ""
method: ""
endpoint: /settings.js
backend: http://localhost:9190
service: ""
Expand Down
26 changes: 26 additions & 0 deletions extensions/_includes/search-config-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Autogenerated
tracing:
enabled: false
type: ""
endpoint: ""
collector: ""
log:
level: ""
pretty: false
color: false
file: ""
debug:
addr: 127.0.0.1:9224
token: ""
pprof: false
zpages: false
grpc:
addr: 127.0.0.1:9220
data_path: ~/.ocis/search
reva:
address: 127.0.0.1:9142
events:
events_endpoint: 127.0.0.1:9233
events_cluster: ocis-cluster
events_group: search
machine_auth_api_key: change-me-please
15 changes: 15 additions & 0 deletions extensions/_includes/search_configvars.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Environment Variables

| Name | Type | Default Value | Description |
|------|------|---------------|-------------|
| SEARCH_DEBUG_ADDR | string | 127.0.0.1:9224 | |
| SEARCH_DEBUG_TOKEN | string | | |
| SEARCH_DEBUG_PPROF | bool | false | |
| SEARCH_DEBUG_ZPAGES | bool | false | |
| ACCOUNTS_GRPC_ADDR | string | 127.0.0.1:9220 | The address of the grpc service.|
| SEARCH_DATA_PATH | string | ~/.ocis/search | |
| REVA_GATEWAY | string | 127.0.0.1:9142 | |
| SEARCH_EVENTS_ENDPOINT | string | 127.0.0.1:9233 | the address of the streaming service|
| SEARCH_EVENTS_CLUSTER | string | ocis-cluster | the clusterID of the streaming service. Mandatory when using nats|
| SEARCH_EVENTS_GROUP | string | search | the customergroup of the service. One group will only get one copy of an event|
| OCIS_MACHINE_AUTH_API_KEY;SEARCH_MACHINE_AUTH_API_KEY | string | change-me-please | |
3 changes: 2 additions & 1 deletion extensions/_includes/web-config-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ web:
- external
- user-management
external_apps: []
options: {}
options:
hideSearchBar: false
2 changes: 1 addition & 1 deletion extensions/port-ranges.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ We also suggest to use the last port in your extensions' range as a debug/metric
| 9205-9209 | [markdown-editor](https://github.com/owncloud/ocis-markdown-editor) |
| 9210-9214 | [reva](https://github.com/owncloud/ocis-reva) unused? |
| 9215-9219 | reva metadata storage |
| 9220-9224 | FREE |
| 9220-9224 | search |
| 9225-9229 | photoprism (state: PoC) |
| 9230-9234 | [nats](https://github.com/owncloud/ocis/tree/master/nats) |
| 9235-9239 | idm TBD |
Expand Down
7 changes: 5 additions & 2 deletions extensions/storage/ports.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ For now, the storage service uses these ports to preconfigure those services:
| 9159 | storage users debug |
| 9160 | groups |
| 9161 | groups debug |
| 9164 | storage appprovider |
| 9165 | storage appprovider debug |
| 9164 | storage appprovider |
| 9165 | storage appprovider debug |
| 9178 | storage public link |
| 9179 | storage public link data |
| 9180 | accounts grpc |
| 9181 | accounts http |
| 9182 | accounts debug |
| 9215 | storage meta grpc |
| 9216 | storage meta http |
| 9217 | storage meta debug |
2 changes: 1 addition & 1 deletion grpc_apis/ocis/messages/accounts/v0/grpc.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "ocis.messages.accounts.v0"
url: /grpc_apis/ocis_messages_accounts_v0
date: 2022-05-02T16:18:37Z
date: 2022-05-02T17:29:10Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
Expand Down
79 changes: 79 additions & 0 deletions grpc_apis/ocis/messages/search/v0/grpc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
title: "ocis.messages.search.v0"
url: /grpc_apis/ocis_messages_search_v0
date: 2022-05-02T17:29:10Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---

{{< toc >}}



## ocis/messages/search/v0/search.proto

### Entity



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| ref | [Reference](#reference) | | |
| id | [ResourceID](#resourceid) | | |
| name | [string](#string) | | |
| etag | [string](#string) | | |
| size | [uint64](#uint64) | | |
| last_modified_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | |
| mime_type | [string](#string) | | |
| permissions | [string](#string) | | |
| type | [uint64](#uint64) | | |
| deleted | [bool](#bool) | | |

### Match



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| entity | [Entity](#entity) | | the matched entity |
| score | [float](#float) | | the match score |

### Reference



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| resource_id | [ResourceID](#resourceid) | | |
| path | [string](#string) | | |

### ResourceID



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| storage_id | [string](#string) | | |
| opaque_id | [string](#string) | | |


## Scalar Value Types

| .proto Type | Notes | C++ | Java |
| ----------- | ----- | --- | ---- |
| {{< div id="double" content="double" >}} | | double | double |
| {{< div id="float" content="float" >}} | | float | float |
| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int |
| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long |
| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int |
| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long |
| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int |
| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long |
| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int |
| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long |
| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int |
| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long |
| {{< div id="bool" content="bool" >}} | | bool | boolean |
| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String |
| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString |

2 changes: 1 addition & 1 deletion grpc_apis/ocis/messages/settings/v0/grpc.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "ocis.messages.settings.v0"
url: /grpc_apis/ocis_messages_settings_v0
date: 2022-05-02T16:18:37Z
date: 2022-05-02T17:29:10Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
Expand Down
2 changes: 1 addition & 1 deletion grpc_apis/ocis/messages/store/v0/grpc.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "ocis.messages.store.v0"
url: /grpc_apis/ocis_messages_store_v0
date: 2022-05-02T16:18:37Z
date: 2022-05-02T17:29:10Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
Expand Down
2 changes: 1 addition & 1 deletion grpc_apis/ocis/messages/thumbnails/v0/grpc.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "ocis.messages.thumbnails.v0"
url: /grpc_apis/ocis_messages_thumbnails_v0
date: 2022-05-02T16:18:37Z
date: 2022-05-02T17:29:10Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
Expand Down
2 changes: 1 addition & 1 deletion grpc_apis/ocis/services/accounts/v0/grpc.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "ocis.services.accounts.v0"
url: /grpc_apis/ocis_services_accounts_v0
date: 2022-05-02T16:18:37Z
date: 2022-05-02T17:29:10Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
Expand Down
Loading

0 comments on commit dda2fd1

Please sign in to comment.