Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch feature ✨💥 (Lombiq Technologies: OSOE-83) #11052

Merged
merged 314 commits into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
314 commits
Select commit Hold shift + click to select a range
da8d3e1
Fix Unit Tests
Skrypt Jul 27, 2022
b3be5eb
Set Elastic document id's with our ContentItemIds
Skrypt Jul 27, 2022
4003136
Use BulkAsync instead of Bulk
Skrypt Jul 27, 2022
4a81792
Add connection types
Skrypt Jul 27, 2022
844ec82
Add connection options to appsettings.json file
Skrypt Jul 27, 2022
cd5a5f1
Enable Exception handling
Skrypt Jul 27, 2022
032da9d
Simplify startup configuration code
Skrypt Jul 27, 2022
355a3f2
Update appsettings example
Skrypt Jul 27, 2022
892ed51
Fix delete issue when a document is not stored at least once.
Skrypt Jul 27, 2022
acdfe31
Fix ElasticSearch.DeleteDocuementsAsync
Skrypt Jul 28, 2022
43d4b71
Add "force delete" an index configuration
Skrypt Jul 28, 2022
eaa3bce
Change how we do special indexing
Skrypt Jul 28, 2022
17454fe
Add options to RawQuery
Skrypt Jul 29, 2022
2b05bed
WIP _stored index configuration for ES and Lucene
Skrypt Jul 29, 2022
eac4dce
Display mappings for reference
Skrypt Jul 29, 2022
65d45fb
WIP _source and/or Fields data fetching/displaying
Skrypt Jul 29, 2022
495750a
Renaming
Skrypt Jul 29, 2022
205f832
simplification
Skrypt Jul 29, 2022
92b640f
wip
Skrypt Aug 1, 2022
a08668d
Fix create link
Skrypt Aug 2, 2022
59e23a1
wip
Skrypt Aug 2, 2022
2e21941
wip
Skrypt Aug 2, 2022
631315b
format
Skrypt Aug 2, 2022
fe3af2b
revert
Skrypt Aug 2, 2022
f5f1759
cleanup
Skrypt Aug 2, 2022
29484de
wip
Skrypt Aug 2, 2022
f855089
revert and cleanup
Skrypt Aug 2, 2022
cfd002a
revert Lucene
Skrypt Aug 2, 2022
ab6820f
Breaking changes documentation
Skrypt Aug 3, 2022
037c86f
Add CloudId example in appsettings.json
Skrypt Aug 3, 2022
07eb637
Renaming Elastic to Elasticsearch
Skrypt Aug 3, 2022
6b3cf70
wip
Skrypt Aug 3, 2022
8df205d
Fix templateoptions for ElasticSearch module
Skrypt Aug 3, 2022
af79b84
Cleanup
Skrypt Aug 3, 2022
86d599a
fix NRE
Skrypt Aug 3, 2022
b261b0c
cleanup
Skrypt Aug 3, 2022
9f38031
move interfaces
Skrypt Aug 3, 2022
5581e66
documentation
Skrypt Aug 3, 2022
a032741
doc
Skrypt Aug 3, 2022
82ce814
cleanup
Skrypt Aug 3, 2022
96a823f
doc
Skrypt Aug 3, 2022
1b96fb6
doc
Skrypt Aug 3, 2022
5d4e96b
Move back to Nest 7.13.2 for OpenSearch compatibility
Skrypt Aug 3, 2022
839bcaa
using latest Nest version
Skrypt Aug 3, 2022
5714b2e
cleanup
Skrypt Aug 3, 2022
ea99d65
cleanup
Skrypt Aug 3, 2022
64cc051
Cleanup
Skrypt Aug 3, 2022
e532db2
settings
Skrypt Aug 3, 2022
7f221a3
cleanup
Skrypt Aug 3, 2022
c8833c0
better fix
Skrypt Aug 3, 2022
2a103e0
Add keyword constant
Skrypt Aug 3, 2022
f92094f
Merge branch 'main' into skrypt/elasticsearch
Skrypt Aug 3, 2022
281af68
doc
Skrypt Aug 4, 2022
a82a010
hints
Skrypt Aug 4, 2022
07d9e1f
Fix Liquid named Queries
Skrypt Aug 4, 2022
b537bdd
Enhancement
Skrypt Aug 5, 2022
7d21b70
Simplifying ElasticSearch Queries
Skrypt Aug 5, 2022
8733334
cleanup
Skrypt Aug 5, 2022
2c94eb0
don't store keyword
Skrypt Aug 5, 2022
3e0818a
wip
Skrypt Aug 5, 2022
d1eab52
Cleanup + comments
Skrypt Aug 5, 2022
e597a5f
Comments
Skrypt Aug 5, 2022
10e51e2
Comments
Skrypt Aug 5, 2022
b9648b6
Comments
Skrypt Aug 5, 2022
620cb3a
Comments
Skrypt Aug 5, 2022
bce20bf
Comments
Skrypt Aug 5, 2022
ef753bb
Comments
Skrypt Aug 5, 2022
801f9eb
cleanup
Skrypt Aug 5, 2022
2933b7b
Add Analyzers settings on CreateIndex
Skrypt Aug 5, 2022
bc5e8fa
cleanup
Skrypt Aug 5, 2022
c88714a
Cleanup
Skrypt Aug 5, 2022
19ebf7a
Fix deployment and naming
Skrypt Aug 6, 2022
6f46f26
test
Skrypt Aug 6, 2022
1442a58
rename
Skrypt Aug 6, 2022
c66a5db
rename
Skrypt Aug 6, 2022
7f82bd8
rename
Skrypt Aug 6, 2022
613cf31
cleanup/reorganization
Skrypt Aug 6, 2022
9ab4509
cleanup
Skrypt Aug 6, 2022
e8d01d4
folder name
Skrypt Aug 6, 2022
05e69c6
startup
Skrypt Aug 6, 2022
5e375cb
singleton
Skrypt Aug 6, 2022
e4a92fe
Comments
Skrypt Aug 6, 2022
e20dd0c
Comments
Skrypt Aug 7, 2022
4bcd32d
cleanup
Skrypt Aug 7, 2022
ed7b36b
cleanup
Skrypt Aug 7, 2022
1a996db
comments
Skrypt Aug 7, 2022
f398d09
Add indexing backgroundtask
Skrypt Aug 7, 2022
affe417
cleanup
Skrypt Aug 7, 2022
785b1fd
Remove ElasticQueryContext
Skrypt Aug 7, 2022
afbb856
Add a way to retrieve the current tenant name in the RecipeExecutor
Skrypt Aug 7, 2022
00c473e
doc
Skrypt Aug 8, 2022
a460248
fix separator
Skrypt Aug 8, 2022
1eb86c3
Secure indices per tenant
Skrypt Aug 9, 2022
c32e11a
Last Task Id
Skrypt Aug 9, 2022
fbbe496
comments
Skrypt Aug 9, 2022
cd8210d
Delete all documents in an index in one request
Skrypt Aug 10, 2022
17d09a7
Insert back DeleteDocumentsAsync
Skrypt Aug 10, 2022
f664215
Add ElasticIndexInitializerService
Skrypt Aug 10, 2022
2f11297
comment
Skrypt Aug 10, 2022
e5a626e
fix startup log messages
Skrypt Aug 10, 2022
b258dbd
We test the Elasticsearch connection on startup
Skrypt Aug 10, 2022
0c0afae
Fix scoped service issue
Skrypt Aug 10, 2022
d547a95
Startup adjustments
Skrypt Aug 10, 2022
fd97b12
Proper index name based on ES specs
Skrypt Aug 10, 2022
0746d71
fix
Skrypt Aug 10, 2022
ec72bd7
simplification
Skrypt Aug 10, 2022
aa33270
comment
Skrypt Aug 10, 2022
8fe52f6
cleanup
Skrypt Aug 10, 2022
d3776e0
Update src/docs/reference/modules/Elasticsearch/README.md
Skrypt Aug 11, 2022
1c556d8
Update src/docs/reference/modules/Elasticsearch/README.md
Skrypt Aug 11, 2022
ade06f3
Update src/OrchardCore.Modules/OrchardCore.Search.Elasticsearch/Views…
Skrypt Aug 11, 2022
719da79
Update src/OrchardCore.Modules/OrchardCore.Search/Views/Search-Form.c…
Skrypt Aug 11, 2022
1fcb13a
Update src/docs/reference/modules/Elasticsearch/README.md
Skrypt Aug 11, 2022
a83bdd4
Update src/OrchardCore.Modules/OrchardCore.Search.Elasticsearch/Start…
Skrypt Aug 11, 2022
6df325f
Update src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Models/E…
Skrypt Aug 11, 2022
e0b42c8
Update src/OrchardCore.Cms.Web/appsettings.json
Skrypt Aug 11, 2022
0ecf735
Fix permissions names
Skrypt Aug 11, 2022
f9f8133
Merge branch 'skrypt/elasticsearch' of https://github.com/OrchardCMS/…
Skrypt Aug 11, 2022
efa80af
update docker-compose.yml
Skrypt Aug 11, 2022
5953558
comments
Skrypt Aug 11, 2022
6b61dd7
remove unecessary comments
Skrypt Aug 11, 2022
9a2e3e3
Update src/docs/reference/modules/Elasticsearch/README.md
Skrypt Aug 11, 2022
cfc0216
Update src/docs/reference/modules/Elasticsearch/README.md
Skrypt Aug 11, 2022
878e3a8
comments
Skrypt Aug 11, 2022
e41b669
optimism is good
Skrypt Aug 11, 2022
a5a1a83
1.5
Skrypt Aug 11, 2022
3375da9
1.5 breaking changes
Skrypt Aug 11, 2022
4bc7120
doc
Skrypt Aug 11, 2022
dd1f23f
doc
Skrypt Aug 11, 2022
4dab8c4
doc
Skrypt Aug 11, 2022
1f7fd2d
doc
Skrypt Aug 11, 2022
5b18a92
doc WSL2
Skrypt Aug 11, 2022
d6cac9d
doc
Skrypt Aug 11, 2022
246a4ed
doc
Skrypt Aug 11, 2022
0e461d5
doc
Skrypt Aug 11, 2022
80dcba9
doc
Skrypt Aug 11, 2022
986b684
doc
Skrypt Aug 11, 2022
bd24371
doc
Skrypt Aug 11, 2022
36fcc24
doc
Skrypt Aug 11, 2022
ee5b588
doc
Skrypt Aug 11, 2022
9db8a13
doc
Skrypt Aug 11, 2022
87ea60f
Update src/docs/reference/modules/Elasticsearch/README.md
Skrypt Aug 11, 2022
f5a4025
Index name doc
Skrypt Aug 11, 2022
41ede3a
Merge branch 'skrypt/elasticsearch' of https://github.com/OrchardCMS/…
Skrypt Aug 11, 2022
522b212
enable OrchardCore.Search feature in recipes
Skrypt Aug 11, 2022
283a12f
removing in the meantime
Skrypt Aug 11, 2022
ae09375
Better Lucene indexing for Text.
Skrypt Aug 11, 2022
2174fa4
Fix unit test
Skrypt Aug 11, 2022
575ba20
Lucene indexing settings
Skrypt Aug 11, 2022
44fc512
DocumentIndexOptions
Skrypt Aug 11, 2022
592caad
Comments
Skrypt Aug 11, 2022
9f401dc
Fix enum flag values so that they don't overlap
Skrypt Aug 11, 2022
c42d1c3
same
Skrypt Aug 11, 2022
c3407a3
small change
Skrypt Aug 11, 2022
aa203e8
Lucene source data
Skrypt Aug 12, 2022
e1e262a
small change
Skrypt Aug 12, 2022
cae7ce2
Comments
Skrypt Aug 12, 2022
fd9ff11
bg task lock
Skrypt Aug 12, 2022
cfceb16
Fix SELECT N+1 issue
Skrypt Aug 12, 2022
21236a0
perf adjustments
Skrypt Aug 12, 2022
5f916dd
Add SQL migration
Skrypt Aug 12, 2022
ae507a1
5 min LockExpiration on background task
Skrypt Aug 12, 2022
170e30d
I break unit tests
Skrypt Aug 12, 2022
4e35047
deployment for search settings
Skrypt Aug 12, 2022
5b13233
doc
Skrypt Aug 12, 2022
5434755
doc
Skrypt Aug 12, 2022
50030bd
doc
Skrypt Aug 12, 2022
b4d98da
Fix unit test
Skrypt Aug 12, 2022
a49bc0e
Move dynamic routing to startup
Skrypt Aug 13, 2022
a44d974
cleanup
Skrypt Aug 13, 2022
5f8bf68
Use DynamicRouteValueTransformer instead
Skrypt Aug 13, 2022
edfbaf8
cleanup
Skrypt Aug 13, 2022
913c899
Store AreaName in SearchSettings
Skrypt Aug 13, 2022
e2bdf47
Fix Elasticsearch contentpicker index selector
Skrypt Aug 13, 2022
1c22741
Adding custom Elasticsearch mappings
Skrypt Aug 13, 2022
b7c598c
doc
Skrypt Aug 13, 2022
13c7d4a
comments
Skrypt Aug 13, 2022
a5f1358
doc
Skrypt Aug 13, 2022
2dc0d9e
Content.ContentItem.DisplayText.Analyzed not stored
Skrypt Aug 13, 2022
8e5696e
cleanup
Skrypt Aug 13, 2022
740ba0a
optimization
Skrypt Aug 13, 2022
877405a
code optimization
Skrypt Aug 13, 2022
d3e2a24
store order
Skrypt Aug 13, 2022
cd475a9
fix unit test
Skrypt Aug 13, 2022
c1725aa
doc
Skrypt Aug 13, 2022
31af06a
doc
Skrypt Aug 13, 2022
7155580
doc
Skrypt Aug 13, 2022
8c5346d
Fix taxonomy indexing
Skrypt Aug 13, 2022
82a73d2
release doc
Skrypt Aug 13, 2022
9eaecfe
comment
Skrypt Aug 13, 2022
b78f6d1
doc
Skrypt Aug 13, 2022
6714582
More manual mappings
Skrypt Aug 13, 2022
f52ad4f
cleanup + doc
Skrypt Aug 13, 2022
8a2ee3a
doc
Skrypt Aug 13, 2022
34ea3c1
full-text mapping
Skrypt Aug 13, 2022
9228997
cleanup
Skrypt Aug 15, 2022
4f6171d
IContentIndexSettings
Skrypt Aug 15, 2022
31964cc
cleanup
Skrypt Aug 15, 2022
97f9bdb
fix NRE on setup
Skrypt Aug 15, 2022
b373fcf
Use current SearchProvider if only one is enabled
Skrypt Aug 16, 2022
8beda06
Fix recipe Query for ES
Skrypt Aug 16, 2022
13f7f4e
hint
Skrypt Aug 16, 2022
67b75b3
Fix NRE with background task
Skrypt Aug 18, 2022
b507f91
optimization
Skrypt Aug 18, 2022
84a8156
Merge branch 'main' into skrypt/elasticsearch
Skrypt Aug 18, 2022
fbe1bd3
Merge branch 'main' into skrypt/elasticsearch
Skrypt Aug 19, 2022
d73cfc2
Remove test file
Skrypt Aug 19, 2022
3178d3d
Update src/OrchardCore.Modules/OrchardCore.Search/Deployment/SearchSe…
Skrypt Aug 24, 2022
62b2e44
Update src/OrchardCore.Modules/OrchardCore.Search.Lucene/Migrations.cs
Skrypt Aug 24, 2022
756c4c8
Update src/OrchardCore.Modules/OrchardCore.Search.Lucene/Migrations.cs
Skrypt Aug 24, 2022
4ab1cd9
Update src/docs/reference/modules/Elasticsearch/README.md
Skrypt Aug 24, 2022
a2af577
doc
Skrypt Aug 25, 2022
616cb1f
remove commented code
Skrypt Aug 25, 2022
9c37687
Fix FullTextContentIndexHandler
Skrypt Aug 25, 2022
1a93824
Add Lucene and Elasticsearch migration
Skrypt Aug 25, 2022
d344c83
doc
Skrypt Aug 25, 2022
b247834
Merge branch 'main' into skrypt/elasticsearch
Skrypt Aug 26, 2022
6724e58
Fix deployment step
Skrypt Aug 29, 2022
d312466
Remove Elasticsearch migration
Skrypt Aug 29, 2022
b0f9532
cleanup
Skrypt Aug 29, 2022
857ede2
Add ElasticSettingsStep
Skrypt Aug 29, 2022
dea0088
doc
Skrypt Aug 29, 2022
53c61dc
doc
Skrypt Aug 29, 2022
1d218d2
Add Rebuild and Reset indices recipe step
Skrypt Sep 6, 2022
b89eb92
Comments
Skrypt Sep 6, 2022
289f799
Merge branch 'main' into skrypt/elasticsearch
Skrypt Sep 6, 2022
534ca03
Merge migration step
Skrypt Sep 6, 2022
7869065
Fix recipe steps
Skrypt Sep 6, 2022
fccd7aa
optimization
Skrypt Sep 6, 2022
a9afc59
doc
Skrypt Sep 6, 2022
20e607f
Fix copy/paste mistake
Skrypt Sep 6, 2022
6d15fad
Fix ResetIndexAsync
Skrypt Sep 10, 2022
28d63ed
Merge branch 'main' into skrypt/elasticsearch
Skrypt Sep 10, 2022
8712a5c
Fix GraphQL provider
Skrypt Sep 10, 2022
ee04028
Fix reset and rebuild recipe IncludeAll
Skrypt Sep 10, 2022
77a3fbb
doc
Skrypt Sep 10, 2022
b5f0300
Revert changes on AdminController
Skrypt Sep 14, 2022
764ed2d
Merge branch 'main' into skrypt/elasticsearch
Skrypt Sep 14, 2022
815fde6
Merge branch 'main' into skrypt/elasticsearch
Skrypt Sep 14, 2022
46e76cc
Fix build after merge
Skrypt Sep 14, 2022
bb849bc
Fix TablePrefix
Skrypt Sep 17, 2022
df26cc8
Fix non awaited delegate
Skrypt Sep 17, 2022
6995ddf
Merge branch 'main' into skrypt/elasticsearch
Skrypt Sep 17, 2022
b902e8d
comment out appsettings
Skrypt Sep 17, 2022
ef7e8e9
removing unnecessary method param
Skrypt Sep 17, 2022
063d3f0
add missing comma
Skrypt Sep 18, 2022
094799c
Update src/OrchardCore.Modules/OrchardCore.Search.Elasticsearch/Views…
Skrypt Sep 18, 2022
d5ac9e6
Fix Elasticsearch page integration
Skrypt Sep 18, 2022
c45796a
Fix DeploymentSource and cleanup
Skrypt Sep 18, 2022
c87c73a
Rename to Elasticsearch Settings and
Skrypt Sep 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 31 additions & 3 deletions OrchardCore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Layers", "src\O
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Lists", "src\OrchardCore.Modules\OrchardCore.Lists\OrchardCore.Lists.csproj", "{ED165AA1-D202-405A-8EC6-5DD0E0B77636}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Lucene", "src\OrchardCore.Modules\OrchardCore.Lucene\OrchardCore.Lucene.csproj", "{245E865F-AC80-4963-8595-F380C458F99E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Search.Lucene", "src\OrchardCore.Modules\OrchardCore.Search.Lucene\OrchardCore.Search.Lucene.csproj", "{245E865F-AC80-4963-8595-F380C458F99E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Markdown", "src\OrchardCore.Modules\OrchardCore.Markdown\OrchardCore.Markdown.csproj", "{DA02314F-7BF6-47C5-B11E-196F13BDDB77}"
EndProject
Expand Down Expand Up @@ -176,11 +176,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Queries", "src\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Liquid.Abstractions", "src\OrchardCore\OrchardCore.Liquid.Abstractions\OrchardCore.Liquid.Abstractions.csproj", "{2DF44392-8882-46B1-8061-61DDBCA358BD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Lucene.Abstractions", "src\OrchardCore\OrchardCore.Lucene.Abstractions\OrchardCore.Lucene.Abstractions.csproj", "{78F13261-B843-4590-8DD5-E9491874D0CD}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Search.Lucene.Abstractions", "src\OrchardCore\OrchardCore.Search.Lucene.Abstractions\OrchardCore.Search.Lucene.Abstractions.csproj", "{78F13261-B843-4590-8DD5-E9491874D0CD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Liquid", "src\OrchardCore.Modules\OrchardCore.Liquid\OrchardCore.Liquid.csproj", "{F8973BF9-4F56-4A59-9153-72BEDB6AB269}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Lucene.Core", "src\OrchardCore\OrchardCore.Lucene.Core\OrchardCore.Lucene.Core.csproj", "{F621B369-15FD-4923-98AD-17740C24CD5C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Search.Lucene.Core", "src\OrchardCore\OrchardCore.Search.Lucene.Core\OrchardCore.Search.Lucene.Core.csproj", "{F621B369-15FD-4923-98AD-17740C24CD5C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Queries.Abstractions", "src\OrchardCore\OrchardCore.Queries.Abstractions\OrchardCore.Queries.Abstractions.csproj", "{AEB44D2A-1493-4550-8B13-EB611B1FB12C}"
EndProject
Expand Down Expand Up @@ -404,6 +404,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Roles.Core", "s
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.AutoSetup", "src\OrchardCore.Modules\OrchardCore.AutoSetup\OrchardCore.AutoSetup.csproj", "{1E76C17C-099A-4E6D-BC26-E93CBA4D0BD6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Search.Elasticsearch.Abstractions", "src\OrchardCore\OrchardCore.Search.Elasticsearch.Abstractions\OrchardCore.Search.Elasticsearch.Abstractions.csproj", "{E6A90BFD-AB5C-4AED-A5AB-799136AB1521}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Search.Elasticsearch.Core", "src\OrchardCore\OrchardCore.Search.Elasticsearch.Core\OrchardCore.Search.Elasticsearch.Core.csproj", "{848C919B-6829-4758-9E59-51F13D25ABBC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Search.Elasticsearch", "src\OrchardCore.Modules\OrchardCore.Search.Elasticsearch\OrchardCore.Search.Elasticsearch.csproj", "{B6A54EA8-F285-436D-8257-6F6EDE4C3339}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Data.YesSql", "src\OrchardCore\OrchardCore.Data.YesSql\OrchardCore.Data.YesSql.csproj", "{F06E4E20-3675-4BA5-AD2D-4538FAB154D5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Data.YesSql.Abstractions", "src\OrchardCore\OrchardCore.Data.YesSql.Abstractions\OrchardCore.Data.YesSql.Abstractions.csproj", "{AB47A65C-7BA9-4CE7-BA73-285EB7A2CEFD}"
Expand Down Expand Up @@ -472,6 +478,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Media.AmazonS3"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.ArchiveLater", "src\OrchardCore.Modules\OrchardCore.ArchiveLater\OrchardCore.ArchiveLater.csproj", "{190C4BEB-C506-4F7F-BDCA-93F3C1C221BC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Search", "src\OrchardCore.Modules\OrchardCore.Search\OrchardCore.Search.csproj", "{7BDF280B-70B7-4AFC-A6F7-B5759DCA2A2C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -1162,6 +1170,18 @@ Global
{1E76C17C-099A-4E6D-BC26-E93CBA4D0BD6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E76C17C-099A-4E6D-BC26-E93CBA4D0BD6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E76C17C-099A-4E6D-BC26-E93CBA4D0BD6}.Release|Any CPU.Build.0 = Release|Any CPU
{E6A90BFD-AB5C-4AED-A5AB-799136AB1521}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E6A90BFD-AB5C-4AED-A5AB-799136AB1521}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E6A90BFD-AB5C-4AED-A5AB-799136AB1521}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E6A90BFD-AB5C-4AED-A5AB-799136AB1521}.Release|Any CPU.Build.0 = Release|Any CPU
{848C919B-6829-4758-9E59-51F13D25ABBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{848C919B-6829-4758-9E59-51F13D25ABBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{848C919B-6829-4758-9E59-51F13D25ABBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{848C919B-6829-4758-9E59-51F13D25ABBC}.Release|Any CPU.Build.0 = Release|Any CPU
{B6A54EA8-F285-436D-8257-6F6EDE4C3339}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6A54EA8-F285-436D-8257-6F6EDE4C3339}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6A54EA8-F285-436D-8257-6F6EDE4C3339}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B6A54EA8-F285-436D-8257-6F6EDE4C3339}.Release|Any CPU.Build.0 = Release|Any CPU
{F06E4E20-3675-4BA5-AD2D-4538FAB154D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F06E4E20-3675-4BA5-AD2D-4538FAB154D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F06E4E20-3675-4BA5-AD2D-4538FAB154D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -1248,6 +1268,10 @@ Global
{190C4BEB-C506-4F7F-BDCA-93F3C1C221BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{190C4BEB-C506-4F7F-BDCA-93F3C1C221BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{190C4BEB-C506-4F7F-BDCA-93F3C1C221BC}.Release|Any CPU.Build.0 = Release|Any CPU
{7BDF280B-70B7-4AFC-A6F7-B5759DCA2A2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7BDF280B-70B7-4AFC-A6F7-B5759DCA2A2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7BDF280B-70B7-4AFC-A6F7-B5759DCA2A2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7BDF280B-70B7-4AFC-A6F7-B5759DCA2A2C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1438,6 +1462,9 @@ Global
{1D0144D0-9E6D-441B-A393-B62F6DC8E97E} = {90030E85-0C4F-456F-B879-443E8A3F220D}
{15E0499A-815D-4E98-B1E4-1C9D7B3D1461} = {F23AC6C2-DE44-4699-999D-3C478EF3D691}
{1E76C17C-099A-4E6D-BC26-E93CBA4D0BD6} = {A066395F-6F73-45DC-B5A6-B4E306110DCE}
{E6A90BFD-AB5C-4AED-A5AB-799136AB1521} = {F23AC6C2-DE44-4699-999D-3C478EF3D691}
{848C919B-6829-4758-9E59-51F13D25ABBC} = {F23AC6C2-DE44-4699-999D-3C478EF3D691}
{B6A54EA8-F285-436D-8257-6F6EDE4C3339} = {90030E85-0C4F-456F-B879-443E8A3F220D}
{F06E4E20-3675-4BA5-AD2D-4538FAB154D5} = {F23AC6C2-DE44-4699-999D-3C478EF3D691}
{AB47A65C-7BA9-4CE7-BA73-285EB7A2CEFD} = {F23AC6C2-DE44-4699-999D-3C478EF3D691}
{442C544F-6587-4FA5-8459-710ED8492AD4} = {F23AC6C2-DE44-4699-999D-3C478EF3D691}
Expand Down Expand Up @@ -1466,6 +1493,7 @@ Global
{38F43FA0-5BA8-4D6B-8F66-C708D590EF76} = {F23AC6C2-DE44-4699-999D-3C478EF3D691}
{FF1C550C-6D30-499A-AF11-68DE7C8B6869} = {90030E85-0C4F-456F-B879-443E8A3F220D}
{190C4BEB-C506-4F7F-BDCA-93F3C1C221BC} = {90030E85-0C4F-456F-B879-443E8A3F220D}
{7BDF280B-70B7-4AFC-A6F7-B5759DCA2A2C} = {90030E85-0C4F-456F-B879-443E8A3F220D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {46A1D25A-78D1-4476-9CBF-25B75E296341}
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ nav:
- Indexing: docs/reference/modules/Indexing/README.md
- SQL Indexing: docs/reference/modules/SQLIndexing/README.md
- Lucene: docs/reference/modules/Lucene/README.md
- Elasticsearch: docs/reference/modules/Elasticsearch/README.md
- Queries: docs/reference/modules/Queries/README.md
- Media:
- Media: docs/reference/modules/Media/README.md
Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Build/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<PackageManagement Include="Moq" Version="4.18.2" />
<PackageManagement Include="ncrontab" Version="3.3.1" />
<PackageManagement Include="Newtonsoft.Json" Version="13.0.1" />
<PackageManagement Include="NEST" Version="7.17.4" />
<PackageManagement Include="NJsonSchema" Version="10.7.2" />
<PackageManagement Include="NLog.Web.AspNetCore" Version="5.1.4" />
<PackageManagement Include="NodaTime" Version="3.1.2" />
Expand All @@ -62,5 +63,4 @@
<PackageManagement Include="YesSql.Filters.Query" Version="3.0.12" />
<PackageManagement Include="ZString" Version="2.4.4" />
</ItemGroup>

</Project>
12 changes: 11 additions & 1 deletion src/OrchardCore.Cms.Web/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,17 @@
// "MaxPagedCount": 500
// }
//},

// Provides Elasticsearch Connection
//"OrchardCore_Elasticsearch": {
// "ConnectionType": "SingleNodeConnectionPool",
// "Url": "http://localhost",
// "Ports": [ 9200 ],
// "Username": "admin",
// "Password": "admin",
// "CloudId": "Orchard_Core_deployment:ZWFzdHVzMi5henVyZS5lbGFzdGljLWNsb3VkLmNvbTo0NDMkNmMxZGQ4YzAzN2=",
// "CertificateFingerprint": "75:21:E7:92:8F:D5:7A:27:06:38:8E:A4:35:FE:F5:17:D7:37:F4:DF:F0:9A:D2:C0:C4:B6:FF:EE:D1:EA:2B:A7",
// "EnableApiVersioningHeader": false
//}
// WARNING: AutoSetup section given as an example for Development only, for Production use "Environment Variables" instead
//"OrchardCore_AutoSetup": {
// "AutoSetupPath": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@
"Editor": "Wysiwyg"
},
"GraphQLContentTypePartSettings": {},
"HtmlBodyPartSettings": {},
"ContentIndexSettings": {}
"HtmlBodyPartSettings": {}
}
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Threading.Tasks;
using System.Threading.Tasks;
using OrchardCore.Alias.Models;
using OrchardCore.Indexing;

Expand All @@ -8,7 +8,7 @@ public class AliasPartIndexHandler : ContentPartIndexHandler<AliasPart>
{
public override Task BuildIndexAsync(AliasPart part, BuildPartIndexContext context)
{
var options = DocumentIndexOptions.Store;
var options = DocumentIndexOptions.Keyword | DocumentIndexOptions.Store;

foreach (var key in context.Keys)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ public override Task BuildIndexAsync(AutoroutePart part, BuildPartIndexContext c
{
var options = context.Settings.ToOptions()
& ~DocumentIndexOptions.Sanitize
& ~DocumentIndexOptions.Analyze
;

foreach (var key in context.Keys)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using OrchardCore.ContentManagement;
using OrchardCore.ContentManagement;

namespace OrchardCore.ContentFields.Fields
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class ContentPickerFieldIndexHandler : ContentFieldIndexHandler<ContentPi
{
public override Task BuildIndexAsync(ContentPickerField field, BuildFieldIndexContext context)
{
var options = DocumentIndexOptions.Store;
var options = DocumentIndexOptions.Keyword | DocumentIndexOptions.Store;

if (field.ContentItemIds.Length > 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class LocalizationSetContentPickerFieldIndexHandler : ContentFieldIndexHa
{
public override Task BuildIndexAsync(LocalizationSetContentPickerField field, BuildFieldIndexContext context)
{
var options = DocumentIndexOptions.Store;
var options = DocumentIndexOptions.Keyword | DocumentIndexOptions.Store;

if (field.LocalizationSets.Length > 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class UserPickerFieldIndexHandler : ContentFieldIndexHandler<UserPickerFi
{
public override Task BuildIndexAsync(UserPickerField field, BuildFieldIndexContext context)
{
var options = DocumentIndexOptions.Store;
var options = DocumentIndexOptions.Keyword | DocumentIndexOptions.Store;

if (field.UserIds.Length > 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class LocalizationPartIndexHandler : ContentPartIndexHandler<Localization
{
public override Task BuildIndexAsync(LocalizationPart part, BuildPartIndexContext context)
{
var options = DocumentIndexOptions.Store;
var options = DocumentIndexOptions.Keyword | DocumentIndexOptions.Store;

foreach (var key in context.Keys)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
using System;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using OrchardCore.ContentManagement.Metadata.Records;
using OrchardCore.Recipes.Events;
using OrchardCore.Recipes.Models;

namespace OrchardCore.ContentTypes
{
/// <summary>
/// This handler provides backward compatibility with ContentIndexSettings that have been migrated to LuceneContentIndexSettings.
/// </summary>
public class LuceneRecipeEventHandler : IRecipeEventHandler
{
public RecipeExecutionContext Context { get; private set; }

public Task RecipeStepExecutedAsync(RecipeExecutionContext context) => Task.CompletedTask;

public Task ExecutionFailedAsync(string executionId, RecipeDescriptor descriptor) => Task.CompletedTask;

public Task RecipeExecutedAsync(string executionId, RecipeDescriptor descriptor) => Task.CompletedTask;

public Task RecipeExecutingAsync(string executionId, RecipeDescriptor descriptor) => Task.CompletedTask;

public Task RecipeStepExecutingAsync(RecipeExecutionContext context)
{
if (context.Name == "ReplaceContentDefinition" || context.Name == "ContentDefinition")
{
var step = context.Step.ToObject<ContentDefinitionStepModel>();

foreach (var contentType in step.ContentTypes)
{
foreach (var partDefinition in contentType.ContentTypePartDefinitionRecords)
{
if (partDefinition.Settings != null)
{
if (partDefinition.Settings.TryGetValue("ContentIndexSettings", out var existingPartSettings) &&
!partDefinition.Settings.ContainsKey("LuceneContentIndexSettings"))
{
partDefinition.Settings.Add(new JProperty("LuceneContentIndexSettings", existingPartSettings));
}

partDefinition.Settings.Remove("ContentIndexSettings");
}
}
}

foreach (var partDefinition in step.ContentParts)
{
if (partDefinition.Settings != null)
{
if (partDefinition.Settings.TryGetValue("ContentIndexSettings", out var existingPartSettings) &&
!partDefinition.Settings.ContainsKey("LuceneContentIndexSettings"))
{
partDefinition.Settings.Add(new JProperty("LuceneContentIndexSettings", existingPartSettings));
}

partDefinition.Settings.Remove("ContentIndexSettings");

foreach (var fieldDefinition in partDefinition.ContentPartFieldDefinitionRecords)
{
if (fieldDefinition.Settings != null)
{
if (fieldDefinition.Settings.TryGetValue("ContentIndexSettings", out var existingFieldSettings) &&
!fieldDefinition.Settings.ContainsKey("LuceneContentIndexSettings"))
{
fieldDefinition.Settings.Add(new JProperty("LuceneContentIndexSettings", existingFieldSettings));
}

fieldDefinition.Settings.Remove("ContentIndexSettings");
}
}
}
}

context.Step = JObject.FromObject(step);
}

return Task.CompletedTask;
}

private class ContentDefinitionStepModel
{
public string Name { get; set; }
public ContentTypeDefinitionRecord[] ContentTypes { get; set; } = Array.Empty<ContentTypeDefinitionRecord>();
public ContentPartDefinitionRecord[] ContentParts { get; set; } = Array.Empty<ContentPartDefinitionRecord>();
}
}
}
3 changes: 3 additions & 0 deletions src/OrchardCore.Modules/OrchardCore.ContentTypes/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using OrchardCore.Mvc.Core.Utilities;
using OrchardCore.Navigation;
using OrchardCore.Recipes;
using OrchardCore.Recipes.Events;
using OrchardCore.Security.Permissions;

namespace OrchardCore.ContentTypes
Expand Down Expand Up @@ -47,6 +48,8 @@ public override void ConfigureServices(IServiceCollection services)
services.AddRecipeExecutionStep<ContentDefinitionStep>();
services.AddRecipeExecutionStep<ReplaceContentDefinitionStep>();
services.AddRecipeExecutionStep<DeleteContentDefinitionStep>();

services.AddTransient<IRecipeEventHandler, LuceneRecipeEventHandler>();
}

public override void Configure(IApplicationBuilder builder, IEndpointRouteBuilder routes, IServiceProvider serviceProvider)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,25 @@ public async Task BuildIndexAsync(BuildIndexContext context)
context.DocumentIndex.Set(
IndexingConstants.BodyAspectBodyKey,
body.Body,
DocumentIndexOptions.Analyze | DocumentIndexOptions.Sanitize);
DocumentIndexOptions.Sanitize);
}

context.DocumentIndex.Set(
IndexingConstants.DisplayTextAnalyzedKey,
context.ContentItem.DisplayText,
DocumentIndexOptions.Analyze | DocumentIndexOptions.Sanitize);
DocumentIndexOptions.Sanitize);

// We need to store because of ContentPickerResultProvider(s)
context.DocumentIndex.Set(
IndexingConstants.DisplayTextKey,
IndexingConstants.DisplayTextKey + IndexingConstants.KeywordKey,
context.ContentItem.DisplayText,
DocumentIndexOptions.Store);
DocumentIndexOptions.Keyword | DocumentIndexOptions.Store);

// We need to store because of ContentPickerResultProvider(s)
context.DocumentIndex.Set(
IndexingConstants.DisplayTextNormalizedKey,
context.ContentItem.DisplayText?.ReplaceDiacritics().ToLower(),
DocumentIndexOptions.Store);
DocumentIndexOptions.Keyword | DocumentIndexOptions.Store);
}
}
}
Loading