diff --git a/src/docs/reference/modules/Elasticsearch/README.md b/src/docs/reference/modules/Elasticsearch/README.md index 4f5ec84dedb..63affe55328 100644 --- a/src/docs/reference/modules/Elasticsearch/README.md +++ b/src/docs/reference/modules/Elasticsearch/README.md @@ -43,7 +43,7 @@ You should get this result in Docker Desktop app: ### Set up Elasticsearch in Orchard Core -- Add Elastic Connection in the shell configuration (OrchardCore.Cms.Web appsettings.json file). [See Elasticsearch Configurations](#elasticsearch-configuration). +- Add Elastic Connection in the shell configuration (OrchardCore.Cms.Web `appsettings.json` file). [See Elasticsearch Configurations](#elasticsearch-configuration). - Start an Orchard Core instance with VS Code debugger - Go to Orchard Core features, Enable Elasticsearch. @@ -109,7 +109,7 @@ It doesn't delete existing entries from the index. { "steps":[ { - "name":"lucene-index-reset", + "name":"elastic-index-reset", "Indices":[ "IndexName1", "IndexName2" @@ -125,7 +125,7 @@ To reset all indices: { "steps":[ { - "name":"lucene-index-reset", + "name":"elastic-index-reset", "IncludeAll":true } ] @@ -141,7 +141,7 @@ Deletes and recreates the full index content. { "steps":[ { - "name":"lucene-index-rebuild", + "name":"elastic-index-rebuild", "Indices":[ "IndexName1", "IndexName2" @@ -157,7 +157,7 @@ To rebuild all indices: { "steps":[ { - "name":"lucene-index-rebuild", + "name":"elastic-index-rebuild", "IncludeAll":true } ] @@ -214,7 +214,7 @@ See: +## Recipe step + +Lucene indices can be created during recipe execution using the `ElasticIndexSettings` step. +Here is a sample step: + +```json +{ + "steps":[ + { + "name":"LuceneIndexSettings", + "Indices":[ + { + "Search":{ + "AnalyzerName":"standardanalyzer", + "IndexLatest":false, + "Culture":"", + "StoreSourceData":false, + "IndexedContentTypes":[ + "Article", + "BlogPost" + ] + } + } + ] + } + ] +} +``` + +## Lucene settings recipe step + +Here is an example for setting default search settings: + +```json +{ + "steps":[ + { + // Create the search settings. + "name":"Settings", + "LuceneSettings":{ + "SearchIndex":"search", + "DefaultSearchFields":[ + "Content.ContentItem.FullText" + ], + "AllowLuceneQueriesInSearch":false + } + } + ] +} +``` + +### Reset Lucene Index Step + +This Reset Index Step resets an Lucene index. +Restarts the indexing process from the beginning in order to update current content items. +It doesn't delete existing entries from the index. + +```json +{ + "steps":[ + { + "name":"lucene-index-reset", + "Indices":[ + "IndexName1", + "IndexName2" + ] + } + ] +} +``` + +To reset all indices: + +```json +{ + "steps":[ + { + "name":"lucene-index-reset", + "IncludeAll":true + } + ] +} +``` + +### Rebuild Lucene Index Step + +This Rebuild Index Step rebuilds an Lucene index. +Deletes and recreates the full index content. + +```json +{ + "steps":[ + { + "name":"lucene-index-rebuild", + "Indices":[ + "IndexName1", + "IndexName2" + ] + } + ] +} +``` + +To rebuild all indices: + +```json +{ + "steps":[ + { + "name":"lucene-index-rebuild", + "IncludeAll":true + } + ] +} +``` + ### Query Filters Query filters are used to retrieve records from Lucene without taking care of the boost values on them. So, it is retrieving records just like a SQL database would do.