Skip to content

Commit ad975e1

Browse files
authored
Merge pull request #519 from humanmade/440-documentation-linting-issues
Reformat docs files after linting
2 parents b82ca9d + e42e54d commit ad975e1

15 files changed

+462
-343
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Import Travis configuration from dev-tools repo
22
version: ~> 1.0
33
import:
4-
- source: humanmade/altis-dev-tools:travis/module.yml@4accc74
4+
- source: humanmade/altis-dev-tools:travis/module.yml@0bfa112a
55
mode: deep_merge_append

docs/README.md

Lines changed: 50 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,101 @@
11
# Search
22

3-
![](./assets/banner-search.png)
3+
![Search Banner](./assets/banner-search.png)
44

5-
The Search module provides a mirrored Elasticsearch index of all CMS content that is optimized for search relevance, speed and accuracy. This operates at a higher level than the primary datastore (MySQL) and is the recommended solution for searching.
5+
The Search module provides a mirrored Elasticsearch index of all CMS content that is optimized for search relevance, speed and
6+
accuracy. This operates at a higher level than the primary data store (MySQL) and is the recommended solution for searching.
67

78
The benefits of using Elasticsearch over MySQL search queries include:
89

910
- Speed
1011
- Advanced text analysis
1112
- Removing HTML
1213
- Language dependent word stemming and stopwords
13-
- Language dependent tokenisation
14+
- Language dependent tokenization
1415
- Configurable relevancy scores
1516
- Fuzzy matching
1617
- Synonyms
1718
- Aggregations for faceted search and statistics
1819

19-
The default Search index and related functionality is provided by the [ElasticPress plugin](https://github.com/10up/ElasticPress) and the multilingual support is derived from [the WordPress.com Elasticsearch library](https://github.com/Automattic/wpes-lib).
20-
20+
The default Search index and related functionality is provided by the [ElasticPress plugin](https://github.com/10up/ElasticPress)
21+
and the multilingual support is derived from [the WordPress.com Elasticsearch library](https://github.com/Automattic/wpes-lib).
2122

2223
## Support
2324

24-
Altis provides the Search module and underlying Elasticsearch server to facilitate search on your site, with default configuration to meet a majority of use cases.
25-
26-
Using developer features of the Search module **requires understanding how Elasticsearch works**. We recommend reading the [Elasticsearch guide by Elastic](https://www.elastic.co/guide/en/elasticsearch/).
25+
Altis provides the Search module and underlying Elasticsearch server to facilitate search on your site, with default configuration
26+
to meet a majority of use cases.
2727

28-
Modifying and tuning search queries for relevance is a subjective process. Additionally, much like writing complex database queries, building custom Elasticsearch queries requires a deep understanding of how Elasticsearch works.
28+
Using developer features of the Search module **requires understanding how Elasticsearch works**. We recommend reading
29+
the [Elasticsearch guide by Elastic](https://www.elastic.co/guide/en/elasticsearch/).
2930

30-
Guides contained in this documentation are on a best-effort basis; for help with tuning or customising search results, the Altis team can help you find a partner to facilitate your use. Altis support cannot help with tuning results, tweaking configuration, or writing custom Elasticsearch queries.
31+
Modifying and tuning search queries for relevance is a subjective process. Additionally, much like writing complex database queries,
32+
building custom Elasticsearch queries requires a deep understanding of how Elasticsearch works.
3133

34+
Guides contained in this documentation are on a best-effort basis; for help with tuning or customising search results, the Altis
35+
team can help you find a partner to facilitate your use. Altis support cannot help with tuning results, tweaking configuration, or
36+
writing custom Elasticsearch queries.
3237

3338
## Terminology
3439

35-
Altis includes the Search module (`altis/enhanced-search`) which is built upon a WordPress plugin called ElasticPress, made by our friends at [10up](https://10up.com). Altis adds additional functionality, including deep integration into the Altis platform.
36-
37-
Altis Cloud includes Elasticsearch backend servers, which are a database tuned specifically for search. The Search module sets up a connection to the Elasticsearch servers.
40+
Altis includes the Search module (`altis/enhanced-search`) which is built upon a WordPress plugin called ElasticPress, made by our
41+
friends at [10up](https://10up.com). Altis adds additional functionality, including deep integration into the Altis platform.
3842

39-
When content is created or updated, that content is **indexed** into Elasticsearch. This works similar to caching, where a copy of your original data is stored within Elasticsearch in an **index** (effectively, a database table). Unlike your original data, the index can also contain additional data just for search, including generated or rendered data. Each item of content is stored as a **document** which has **fields** containing the data.
43+
Altis Cloud includes Elasticsearch backend servers, which are a database tuned specifically for search. The Search module sets up a
44+
connection to the Elasticsearch servers.
4045

41-
When a user searches for content on your site, Altis converts this into a **query**. The query is run in Elasticsearch against your indexed content, which generates results with a **relevancy score**. Relevancy scores are based on the index configuration, field configuration, the query being run, and the indexed data.
46+
When content is created or updated, that content is **indexed** into Elasticsearch. This works similar to caching, where a copy of
47+
your original data is stored within Elasticsearch in an **index** (effectively, a database table). Unlike your original data, the
48+
index can also contain additional data just for search, including generated or rendered data. Each item of content is stored as a *
49+
*document** which has **fields** containing the data.
4250

51+
When a user searches for content on your site, Altis converts this into a **query**. The query is run in Elasticsearch against your
52+
indexed content, which generates results with a **relevancy score**. Relevancy scores are based on the index configuration, field
53+
configuration, the query being run, and the indexed data.
4354

4455
## Indexing
4556

46-
The indexing process is performed automatically for you by Altis, indexing [most forms of content on your site](./indexing/README.md). Content can be [reindexed if necessary](./indexing/reindexing.md), and [additional data can be indexed](./indexing/additional-data.md).
47-
57+
The indexing process is performed automatically for you by Altis,
58+
indexing [most forms of content on your site](./indexing/README.md). Content can
59+
be [reindexed if necessary](./indexing/reindexing.md), and [additional data can be indexed](./indexing/additional-data.md).
4860

4961
## Querying
5062

51-
Altis [automatically integrates with search queries](./querying/cms-integration.md), as well as providing [autosuggest functionality automatically for your search forms](./querying/autosuggest.md).
63+
Altis [automatically integrates with search queries](./querying/cms-integration.md), as well as
64+
providing [autosuggest functionality automatically for your search forms](./querying/autosuggest.md).
5265

5366
Developers can also use [custom queries](./querying/custom-queries.md) for advanced feature development.
5467

55-
5668
## Configuration
5769

58-
Altis provides [various configuration options](./configuration/README.md) to allow adjusting ElasticPress and Elasticsearch behaviour.
59-
60-
You can also use these options to [tune relevancy scoring](./configuration/tuning.md), including [date-based "decay"](./configuration/date-decay.md).
70+
Altis provides [various configuration options](./configuration/README.md) to allow adjusting ElasticPress and Elasticsearch
71+
behaviour.
6172

62-
Users can also use the [custom user dictionary settings](./configuration/custom-dictionaries.md) to adjust how text is analyzed, including support for synonyms, stop words and custom text analysis for Japanese.
73+
You can also use these options to [tune relevancy scoring](./configuration/tuning.md),
74+
including [date-based "decay"](./configuration/date-decay.md).
6375

76+
Users can also use the [custom user dictionary settings](./configuration/custom-dictionaries.md) to adjust how text is analyzed,
77+
including support for synonyms, stop words and custom text analysis for Japanese.
6478

6579
## Disabling Search
6680

67-
The Search module works by overriding default WordPress search, which uses MySQL full-text search. If you would prefer to use MySQL search, you can deactivate the search module via your config:
81+
The Search module works by overriding default WordPress search, which uses MySQL full-text search. If you would prefer to use MySQL
82+
search, you can deactivate the search module via your config:
6883

6984
```json
7085
{
71-
"extra": {
72-
"altis": {
73-
"modules": {
74-
"search": {
75-
"enabled": false
76-
}
77-
}
78-
}
79-
}
86+
"extra": {
87+
"altis": {
88+
"modules": {
89+
"search": {
90+
"enabled": false
91+
}
92+
}
93+
}
94+
}
8095
}
8196
```
8297

83-
**Note:** turning this module off does not remove the Elasticsearch server. This can still be used for [Native Analytics](docs://analytics/native/README.md) and any custom use cases.
98+
**Note:** turning this module off does not remove the Elasticsearch server. This can still be used
99+
for [Native Analytics](docs://analytics/native/README.md) and any custom use cases.
84100

85101
Additionally, this will increase load on your database servers. Depending on your Altis subscription, this may incur extra cost.

docs/configuration/README.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,27 @@ Altis strives to provide a great out-of-the-box search experience for most uses.
44

55
For advanced usage, additional configuration is available to adjust search behaviour in indexing and querying.
66

7-
87
## Tuning
98

10-
When searching, results can be ordered by relevancy score. This score is based on a blend of various factors, including index configuration, field configuration, the query being run, and the indexed data.
11-
12-
To help adjust relevancy, Altis provides [various configuration settings to tune relevancy and search behaviour](./tuning.md), allowing for stricter or more permissive matching, advanced query operators, and fuzzy matching.
9+
When searching, results can be ordered by relevancy score. This score is based on a blend of various factors, including index
10+
configuration, field configuration, the query being run, and the indexed data.
1311

12+
To help adjust relevancy, Altis provides [various configuration settings to tune relevancy and search behaviour](./tuning.md),
13+
allowing for stricter or more permissive matching, advanced query operators, and fuzzy matching.
1414

1515
## Date Decay
1616

17-
For most use cases, you'll want to treat newer results as more relevant than older ones. Altis includes [date decay functionality](./date-decay.md) which automatically adjusts relevancy scores based on dates. These parameters can be tuned as part of the configuration.
18-
19-
17+
For most use cases, you'll want to treat newer results as more relevant than older ones. Altis
18+
includes [date decay functionality](./date-decay.md) which automatically adjusts relevancy scores based on dates. These parameters
19+
can be tuned as part of the configuration.
2020

2121
## User Dictionaries
2222

23-
When indexing content, Elasticsearch uses analyzers to convert text from a raw string into data which can be queried. Altis provides [analyzers for common languages](../language-support.md) out of the box.
24-
25-
Altis also provides the ability to upload [custom user dictionaries](./custom-dictionaries.md), which allow adding synonyms, stop words and custom text analysis for Japanese to improve analysis.
23+
When indexing content, Elasticsearch uses analyzers to convert text from a raw string into data which can be queried. Altis
24+
provides [analyzers for common languages](../language-support.md) out of the box.
2625

26+
Altis also provides the ability to upload [custom user dictionaries](./custom-dictionaries.md), which allow adding synonyms, stop
27+
words and custom text analysis for Japanese to improve analysis.
2728

2829
## Additional Configuration Options
2930

@@ -41,13 +42,17 @@ The following options can be enabled/disabled via the search configuration.
4142

4243
To find related posts leveraging Elasticsearch, use the `ep_find_related()` function.
4344

44-
The function requires a single parameter ( `$post_id` ) with another optional parameter ( `$return` ). The `$post_id` will be used to find the posts that are related to it, with `$return` specifying the number of related posts to return, which defaults to 5.
45-
46-
If an out of the box solution is desired, the "ElasticPress - Related Posts" widget can be added to your site's sidebar. In order for the widget to work correctly it needs to be added to the sidebar which will be displayed for a single post.
45+
The function requires a single parameter ( `$post_id` ) with another optional parameter ( `$return` ). The `$post_id` will be used
46+
to find the posts that are related to it, with `$return` specifying the number of related posts to return, which defaults to 5.
4747

48+
If an out of the box solution is desired, the "ElasticPress - Related Posts" widget can be added to your site's sidebar. In order
49+
for the widget to work correctly it needs to be added to the sidebar which will be displayed for a single post.
4850

4951
### Facets
5052

51-
Facets are a feature in ElasticPress which add control to filter content by one or more taxonomies. A widget can be added so when viewing a content list (archive), the taxonomy and all of its terms will be displayed. This will allow a vistors to further filter content.
53+
Facets are a feature in ElasticPress which add control to filter content by one or more taxonomies. A widget can be added so when
54+
viewing a content list (archive), the taxonomy and all of its terms will be displayed. This will allow a visitor to further filter
55+
content.
5256

53-
Depending on the configuration specified for `facets`, if the `match-type` property is set to `any`, it will force the results to match any selected taxonomy term. If set to `all`, it will match to results with all of the selected terms.
57+
Depending on the configuration specified for `facets`, if the `match-type` property is set to `any`, it will force the results to
58+
match any selected taxonomy term. If set to `all`, it will match to results with all of the selected terms.

0 commit comments

Comments
 (0)