You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-3Lines changed: 21 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -269,9 +269,25 @@ GET /documents/search?filter[files.content]=open-source"
269
269
```
270
270
271
271
### How to inspect the content of a search index
272
-
The content of a search index can be inspected by running a [Kibana](https://www.elastic.co/kibana) dashboard on top of Elasticseach.
272
+
The content of a search index can be inspected by running a [Kibana](https://www.elastic.co/kibana) dashboard on top of Elasticseach by adding the following snippet to your `docker-compose.override.yml`
273
273
274
-
[To be completed...]
274
+
```yaml
275
+
services:
276
+
kibana:
277
+
image: docker.elastic.co/kibana/kibana-oss:7.6.2
278
+
ports:
279
+
- 127.0.0.1:5601:5601
280
+
user: root
281
+
command: |
282
+
sh -c "/usr/local/bin/kibana-docker --allow-root;"
283
+
```
284
+
285
+
Start the container
286
+
```bash
287
+
docker-compose up -d kibana
288
+
```
289
+
290
+
Once Kibana has started the dashboard is available at http://localhost:5601
275
291
276
292
Make sure not to expose the Kibana dashboard in a production environment!
277
293
@@ -761,10 +777,12 @@ Configure indexes to be pre-built when the application starts. For each user sea
761
777
Note that if you want to prepare indexes for all user profiles in your application, you will have to provide an entry in the `eager_indexing_groups` list for **each** possible variable value. For example, if you have an authorization group defining a user can only access the data of his company (hence, the company name is a variable of the authorization group), you will need to define an eager index group for each of the possible companies in your application.
762
778
763
779
#### Additive index access rights
764
-
Additive indexes are indexes that may be combined to respond to a search query in order to fully match the user's authorization groups. If a user is granted access to multiple groups, indexes will be combined to calculate the response. Therefore, it's strongly adviced the indexes contain non-overlapping data.
780
+
Additive indexes are indexes that may be combined to respond to a search query in order to fully match the user's authorization groups. If a user is granted access to multiple groups, indexes will be combined to calculate the response. Therefore, it's strongly adviced the indexes contain non-overlapping data. Otherwise the result set may contain duplicates (see also: [removing duplicate results](https://github.com/mu-semtech/mu-search?tab=readme-ov-file#removing-duplicate-results)).
765
781
766
782
Only indexes that are defined in the `eager_indexing_groups` will be used in combinations. If no combination can be found that fully matches the user's authorization group a single index will be created for the request's authorization groups.
767
783
784
+
If data that is needed to build documents of a search index is stored across different authorization groups (e.g. public and an organization specific group), these groups need to be specified together in an eager group and not seperately. Otherwise the search index will only contain 'partial' documents.
785
+
768
786
Assume your application contains a company-specific user group in the authorization configuration; 2 companies: company X and company Y; and mu-search contains one search index definition for documents. A search index will be generated for documents of company X and another index will be generated for documents of company Y. If a user is granted access to documents of company X as well as for documents of company Y, a search query performed by this user will be effectuated by combining both search indexes.
769
787
770
788
A typical group to be specified as a single `eager_indexing_group` is `{ "variables": [], "name": "clean" }`. The index will not contain any data, but will be used in the combination to fully match the user's allowed groups.
0 commit comments