Skip to content

Commit a40781e

Browse files
committed
Merge branch 'master' into feature/lazy-eager-indexes
2 parents 558d359 + b4852d5 commit a40781e

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,25 @@ GET /documents/search?filter[files.content]=open-source"
269269
```
270270

271271
### 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`
273273

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
275291

276292
Make sure not to expose the Kibana dashboard in a production environment!
277293

@@ -761,10 +777,12 @@ Configure indexes to be pre-built when the application starts. For each user sea
761777
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.
762778

763779
#### 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)).
765781

766782
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.
767783

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+
768786
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.
769787

770788
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

Comments
 (0)