Skip to content

Commit 4296fa1

Browse files
committed
Docs: Extra comment regarding the action of "indexing"
- Standardise doc formatting
1 parent f621bf2 commit 4296fa1

1 file changed

Lines changed: 14 additions & 29 deletions

File tree

README.md

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# 🧺 Silverstripe Forager > <img src="https://www.silverstripe.com/favicon.ico" style="height:40px; vertical-align:middle"/> Silverstripe Search
22

3-
This module provides the ability to index content for a Silverstripe Search engine through the 🌈 Bifröst - the API for
4-
Silverstripe's Search service.
3+
This module provides the ability to index content for a Silverstripe Search engine through the 🌈 Bifröst - the API for Silverstripe's Search service.
54

6-
This module **does not** provide any method for performing searches on your engines. See the [Searching](#searching)
7-
section below for some suggestions.
5+
This module **does not** provide any method for performing searches on your engines. See the [Searching](#searching) section below for some suggestions.
86

97
<!-- TOC -->
108
* [🧺 Silverstripe Forager > <img src="https://www.silverstripe.com/favicon.ico" style="height:40px; vertical-align:middle"/> Silverstripe Search](#-silverstripe-forager--img-srchttpswwwsilverstripecomfaviconico-styleheight40px-vertical-alignmiddle-silverstripe-search)
@@ -30,18 +28,15 @@ composer require silverstripe/silverstripe-forager-bifrost
3028
> **TL;DR:**\
3129
> For all intents and purposes, "engine" and "index" are synonomous. If we refer to something as "engine", but the Discoverer module is asking for an "index", then you simply need to give it the data you have for your engine.
3230
33-
The Discoverer module is built to be service agnostic; meaning, you can use it with any search provider, as long as
34-
there is an adaptor (like this module) for that service.
31+
The Discoverer module is built to be service agnostic; meaning, you can use it with any search provider, as long as there is an adaptor (like this module) for that service.
3532

36-
When Discoverer refers to an "index", it is talking about the data store used for housing your content. These data
37-
stores are known by different names across different search providers. Algolia and Elasticsearch call them "indexes",
38-
Typesense calls them "collections", App Search calls them "engines". Discoverer had to call them **something** in its
39-
code, and it chose to call then "indexes"; Silverstripe Search, however, calls them "engines".
33+
When Discoverer refers to an "index", it is talking about the data store used for housing your content. These data stores are known by different names across different search providers. Algolia and Elasticsearch call them "indexes", Typesense calls them "collections", App Search calls them "engines". Discoverer had to call them **something** in its code, and it chose to call then "indexes"; Silverstripe Search, however, calls them "engines".
34+
35+
Actions apply in the same way to all of the above. In Silverstripe Search, the action of "indexing" is the action of adding data to your engine, where it is said to be "indexed". Updating that data is commonly referred to as "re-indexing".
4036

4137
## Specify environment variables
4238

43-
To integrate with Silverstripe Search, define environment variables containing your endpoint, engine prefix, and
44-
management API key.
39+
To integrate with Silverstripe Search, define environment variables containing your endpoint, engine prefix, and management API key.
4540

4641
```
4742
BIFROST_ENDPOINT="https://abc.provided.domain"
@@ -67,22 +62,16 @@ For example:
6762

6863
**Why?**
6964

70-
Because you probably have more than one environment type that you're running search on (e.g. Production and UAT), and
71-
(generally speaking) you should have different engines for each of those environments. So, you can't just hardcode
72-
the entire engine name into your project, because that code doesn't change between environments.
65+
Because you probably have more than one environment type that you're running search on (e.g. Production and UAT), and (generally speaking) you should have different engines for each of those environments. So, you can't just hardcode the entire engine name into your project, because that code doesn't change between environments.
7366

74-
Whenever you make a query, Forager will ask you for the "index" name; you will actually want to provide only the
75-
`<suffix>`. We will then take `BIFROST_ENGINE_PREFIX` and your `<suffix>`, put them together, and that's what will be
76-
queried. This allows you to set `BIFROST_ENGINE_PREFIX` differently for each environment, while having your `<suffix>`
77-
hardcoded in your project.
67+
Whenever you make a query, Forager will ask you for the "index" name; you will actually want to provide only the `<suffix>`. We will then take `BIFROST_ENGINE_PREFIX` and your `<suffix>`, put them together, and that's what will be queried. This allows you to set `BIFROST_ENGINE_PREFIX` differently for each environment, while having your `<suffix>` hardcoded in your project.
7868

7969
## Configuration
8070

8171
> [!WARNING]
8272
> Once you add a field to an index you cannot change its name or type without deleting the engine so choose field names and set their types carefully
8373
84-
The most notable configuration surface is the schema, which determines how data is stored in your index. There are five
85-
types of data supported:
74+
The most notable configuration surface is the schema, which determines how data is stored in your index. There are five types of data supported:
8675

8776
* `text` (default)
8877
* `date`
@@ -106,8 +95,7 @@ SilverStripe\Forager\Service\IndexConfiguration:
10695
type: text
10796
```
10897
109-
Continuing with the `acmecorp` engine examples; they have 2 engines per environment, so it would look something like
110-
this:
98+
Continuing with the `acmecorp` engine examples; they have 2 engines per environment, so it would look something like this:
11199

112100
```yaml
113101
SilverStripe\Forager\Service\IndexConfiguration:
@@ -122,15 +110,13 @@ SilverStripe\Forager\Service\IndexConfiguration:
122110

123111
### File attachments for content extraction
124112

125-
Firstly, you will need to set this environment variable. This will apply an extension to the `File` class, and allow
126-
you to use the `_attachment` field (detailed below).
113+
Firstly, you will need to set this environment variable. This will apply an extension to the `File` class, and allow you to use the `_attachment` field (detailed below).
127114

128115
```yaml
129116
SEARCH_INDEX_FILES=1
130117
```
131118

132-
Silverstripe Search supports content extraction for many different file types. These can be attached to your Documents
133-
using an `_attachment` field of type `binary`.
119+
Silverstripe Search supports content extraction for many different file types. These can be attached to your Documents using an `_attachment` field of type `binary`.
134120

135121
This field needs to contain a base 64 encoded string of binary for the file you wish to process.
136122

@@ -148,8 +134,7 @@ SilverStripe\Forager\Service\IndexConfiguration:
148134
type: binary
149135
```
150136

151-
Where `getBase64String` is a method in our `FileExtension` - which is applied to the `File` class by default as part
152-
of this module.
137+
Where `getBase64String` is a method in our `FileExtension` - which is applied to the `File` class by default as part of this module.
153138

154139
## Additional documentation
155140

0 commit comments

Comments
 (0)