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 3 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions OrchardCore.sln
Original file line number Diff line number Diff line change
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.Elastic.Abstractions", "src\OrchardCore\OrchardCore.Search.Elastic.Abstractions\OrchardCore.Search.Elastic.Abstractions.csproj", "{E6A90BFD-AB5C-4AED-A5AB-799136AB1521}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Search.Elastic.Core", "src\OrchardCore\OrchardCore.Search.Elastic.Core\OrchardCore.Search.Elastic.Core.csproj", "{848C919B-6829-4758-9E59-51F13D25ABBC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Search.Elastic", "src\OrchardCore.Modules\OrchardCore.Search.Elastic\OrchardCore.Search.Elastic.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 @@ -1158,6 +1164,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 @@ -1426,6 +1444,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
2 changes: 1 addition & 1 deletion src/OrchardCore.Build/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<PackageManagement Include="Moq" Version="4.18.1" />
<PackageManagement Include="ncrontab" Version="3.3.1" />
<PackageManagement Include="Newtonsoft.Json" Version="13.0.1" />
<PackageManagement Include="NEST" Version="7.12.0" />
<PackageManagement Include="NJsonSchema" Version="10.7.2" />
<PackageManagement Include="NLog.Web.AspNetCore" Version="5.0.0" />
<PackageManagement Include="NodaTime" Version="3.1.0" />
Expand All @@ -58,5 +59,4 @@
<PackageManagement Include="YesSql.Filters.Query" Version="3.0.12" />
<PackageManagement Include="ZString" Version="2.4.4" />
</ItemGroup>

</Project>
7 changes: 5 additions & 2 deletions src/OrchardCore.Cms.Web/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@
// "ChangePasswordUrl": "ChangePassword",
// "ExternalLoginsUrl": "ExternalLogins"
//},

// Provides Elastic Connection
"OrchardCore_Elastic": {
Skrypt marked this conversation as resolved.
Show resolved Hide resolved
"Url": "http://localhost:9200"
}
// WARNING: AutoSetup section given as an example for Development only, for Production use "Environment Variables" instead
//"OrchardCore_AutoSetup": {
// "AutoSetupPath": "",
Expand Down Expand Up @@ -146,4 +149,4 @@
// "Url": "/health/live"
//},
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
},
"GraphQLContentTypePartSettings": {},
"HtmlBodyPartSettings": {},
"ContentIndexSettings": {}
"LuceneContentIndexSettings": {}
}
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using System.Collections.Generic;
using System.Reflection;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using OrchardCore.ContentManagement;
using OrchardCore.ContentManagement.Metadata;
using OrchardCore.ContentManagement.Metadata.Models;
using OrchardCore.Indexing;
using OrchardCore.Modules;

Expand Down Expand Up @@ -49,7 +51,9 @@ public async Task BuildIndexAsync(BuildIndexContext context)
var partActivator = _contentPartFactory.GetTypeActivator(partTypeName);
var part = (ContentPart)context.ContentItem.Get(partActivator.Type, partName);

var typePartIndexSettings = contentTypePartDefinition.GetSettings<ContentIndexSettings>();
MethodInfo ContentTypePartDefinitionMethod = typeof(ContentTypePartDefinition).GetMethod("GetSettings");
Skrypt marked this conversation as resolved.
Show resolved Hide resolved
MethodInfo ContentTypePartDefinitionGeneric = ContentTypePartDefinitionMethod.MakeGenericMethod(context.Settings.GetType());
var typePartIndexSettings = (IContentIndexSettings)ContentTypePartDefinitionGeneric.Invoke(contentTypePartDefinition, null);
Skrypt marked this conversation as resolved.
Show resolved Hide resolved

// Skip this part if it's not included in the index and it's not the default type part
if (contentTypeDefinition.Name != partTypeName && !typePartIndexSettings.Included)
Expand All @@ -63,7 +67,9 @@ await _partIndexHandlers.InvokeAsync((handler, part, contentTypePartDefinition,

foreach (var contentPartFieldDefinition in contentTypePartDefinition.PartDefinition.Fields)
{
var partFieldIndexSettings = contentPartFieldDefinition.GetSettings<ContentIndexSettings>();
MethodInfo ContentPartFieldDefinitionMethod = typeof(ContentPartFieldDefinition).GetMethod("GetSettings");
MethodInfo ContentPartFieldDefinitionGeneric = ContentPartFieldDefinitionMethod.MakeGenericMethod(context.Settings.GetType());
var partFieldIndexSettings = (IContentIndexSettings)ContentPartFieldDefinitionGeneric.Invoke(contentPartFieldDefinition, null);

if (!partFieldIndexSettings.Included)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"FacebookPluginPartSettings": {
"Liquid": "<div class=\"fb-customerchat\"\r\n page_id=\"<PAGE_ID>\">\r\n</div>"
},
"ContentIndexSettings": {}
"LuceneContentIndexSettings": {}
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public override async Task BuildIndexAsync(BagPart bagPart, BuildPartIndexContex
keys.Add($"{key}.{contentItem.ContentType}");
}

var buildIndexContext = new BuildIndexContext(context.DocumentIndex, contentItem, keys);
var buildIndexContext = new BuildIndexContext(context.DocumentIndex, contentItem, keys, context.Settings);
Skrypt marked this conversation as resolved.
Show resolved Hide resolved

await contentItemIndexHandler.BuildIndexAsync(buildIndexContext);
}
Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Lucene/AdminMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder)
.Permission(Permissions.ManageIndexes)
.LocalNav()))
.Add(S["Settings"], settings => settings
.Add(S["Search"], S["Search"].PrefixPosition(), entry => entry
.Add(S["Lucene"], S["Lucene"].PrefixPosition(), entry => entry
.Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = LuceneSettingsDisplayDriver.GroupId })
.Permission(Permissions.ManageIndexes)
.LocalNav()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace OrchardCore.Lucene.Drivers
{
public class LuceneSettingsDisplayDriver : SectionDisplayDriver<ISite, LuceneSettings>
{
public const string GroupId = "search";
public const string GroupId = "lucene";
private readonly LuceneIndexSettingsService _luceneIndexSettingsService;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IAuthorizationService _authorizationService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using OrchardCore.ContentPreview;
using OrchardCore.Environment.Shell.Scope;
using OrchardCore.Indexing;
using OrchardCore.Lucene.Model;
using OrchardCore.Modules;

namespace OrchardCore.Lucene.Handlers
Expand Down Expand Up @@ -106,7 +107,7 @@ private static async Task IndexingAsync(ShellScope scope, IEnumerable<ContentCon
}
else
{
var buildIndexContext = new BuildIndexContext(new DocumentIndex(contentItem.ContentItemId), contentItem, new string[] { contentItem.ContentType });
var buildIndexContext = new BuildIndexContext(new DocumentIndex(contentItem.ContentItemId), contentItem, new string[] { contentItem.ContentType }, new LuceneContentIndexSettings());
await contentItemIndexHandlers.InvokeAsync(x => x.BuildIndexAsync(buildIndexContext), logger);

await luceneIndexManager.DeleteDocumentsAsync(indexSettings.IndexName, new string[] { contentItem.ContentItemId });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
namespace OrchardCore.Indexing
using OrchardCore.Indexing;

namespace OrchardCore.Lucene.Model
{
/// <summary>
/// Represents the indexing settings for a content part or a field.
/// </summary>
public class ContentIndexSettings
public class LuceneContentIndexSettings : IContentIndexSettings
{
public bool Included { get; set; }
public bool Stored { get; set; }
Expand All @@ -26,4 +28,4 @@ public DocumentIndexOptions ToOptions()
return options;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ await shellScope.UsingAsync(async scope =>
var contentItem = await contentManager.GetAsync(task.ContentItemId);
if (contentItem != null)
{
publishedIndexContext = new BuildIndexContext(new DocumentIndex(task.ContentItemId), contentItem, new string[] { contentItem.ContentType });
publishedIndexContext = new BuildIndexContext(new DocumentIndex(task.ContentItemId), contentItem, new string[] { contentItem.ContentType }, new LuceneContentIndexSettings());
await indexHandlers.InvokeAsync(x => x.BuildIndexAsync(publishedIndexContext), _logger);
}
}
Expand All @@ -165,7 +165,7 @@ await shellScope.UsingAsync(async scope =>
var contentItem = await contentManager.GetAsync(task.ContentItemId, VersionOptions.Latest);
if (contentItem != null)
{
latestIndexContext = new BuildIndexContext(new DocumentIndex(task.ContentItemId), contentItem, new string[] { contentItem.ContentType });
latestIndexContext = new BuildIndexContext(new DocumentIndex(task.ContentItemId), contentItem, new string[] { contentItem.ContentType }, new LuceneContentIndexSettings());
await indexHandlers.InvokeAsync(x => x.BuildIndexAsync(latestIndexContext), _logger);
}
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using OrchardCore.DisplayManagement.ModelBinding;
using OrchardCore.DisplayManagement.Views;
using OrchardCore.Indexing;
using OrchardCore.Lucene.Model;

namespace OrchardCore.Lucene.Settings
{
Expand All @@ -27,9 +28,9 @@ public override async Task<IDisplayResult> EditAsync(ContentPartFieldDefinition
return null;
}

return Initialize<ContentIndexSettingsViewModel>("ContentIndexSettings_Edit", model =>
return Initialize<LuceneContentIndexSettingsViewModel>("LuceneContentIndexSettings_Edit", model =>
{
model.ContentIndexSettings = contentPartFieldDefinition.GetSettings<ContentIndexSettings>();
model.LuceneContentIndexSettings = contentPartFieldDefinition.GetSettings<LuceneContentIndexSettings>();
}).Location("Content:10");
}

Expand All @@ -40,13 +41,13 @@ public override async Task<IDisplayResult> UpdateAsync(ContentPartFieldDefinitio
return null;
}

var model = new ContentIndexSettingsViewModel();
var model = new LuceneContentIndexSettingsViewModel();

await context.Updater.TryUpdateModelAsync(model, Prefix);

context.Builder.WithSettings(model.ContentIndexSettings);
context.Builder.WithSettings(model.LuceneContentIndexSettings);

return await EditAsync(contentPartFieldDefinition, context.Updater);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using OrchardCore.DisplayManagement.ModelBinding;
using OrchardCore.DisplayManagement.Views;
using OrchardCore.Indexing;
using OrchardCore.Lucene.Model;

namespace OrchardCore.Lucene.Settings
{
Expand All @@ -27,9 +28,9 @@ public override async Task<IDisplayResult> EditAsync(ContentTypePartDefinition c
return null;
}

return Initialize<ContentIndexSettingsViewModel>("ContentIndexSettings_Edit", model =>
return Initialize<LuceneContentIndexSettingsViewModel>("LuceneContentIndexSettings_Edit", model =>
{
model.ContentIndexSettings = contentTypePartDefinition.GetSettings<ContentIndexSettings>();
model.LuceneContentIndexSettings = contentTypePartDefinition.GetSettings<LuceneContentIndexSettings>();
}).Location("Content:10");
}

Expand All @@ -40,13 +41,13 @@ public override async Task<IDisplayResult> UpdateAsync(ContentTypePartDefinition
return null;
}

var model = new ContentIndexSettingsViewModel();
var model = new LuceneContentIndexSettingsViewModel();

await context.Updater.TryUpdateModelAsync(model, Prefix);

context.Builder.WithSettings(model.ContentIndexSettings);
context.Builder.WithSettings(model.LuceneContentIndexSettings);

return await EditAsync(contentTypePartDefinition, context.Updater);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using OrchardCore.Lucene.Model;

namespace OrchardCore.Lucene.Settings
{
public class LuceneContentIndexSettingsViewModel
{
public LuceneContentIndexSettings LuceneContentIndexSettings { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
int endIndex = startIndex + Model.Indexes.Count() - 1;
}

<zone Name="Title"><h1>@RenderTitleSegments(T["Indices"])</h1></zone>
<zone Name="Title"><h1>@RenderTitleSegments(T["Lucene Indices"])</h1></zone>

@* the form is necessary to generate and antiforgery token for the delete action *@
<form asp-action="Index" method="post" class="no-multisubmit">
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@model OrchardCore.Lucene.Settings.LuceneContentIndexSettingsViewModel
<h4>Lucene</h4>

<div class="mb-3">
<div class="form-check">
<input type="checkbox" class="form-check-input" asp-for="LuceneContentIndexSettings.Included" data-bs-toggle="collapse" data-bs-target="#index-settings" checked="@Model.LuceneContentIndexSettings.Included" />
<label class="form-check-label" asp-for="LuceneContentIndexSettings.Included">@T["Include this element in the index"]</label>
<span class="hint dashed">@T["Check to include the value of this element in the index."]</span>
</div>
<div id="index-settings" class="collapse">

<div class="form-check">
<input type="checkbox" class="form-check-input" asp-for="LuceneContentIndexSettings.Stored" checked="@Model.LuceneContentIndexSettings.Stored" />
<label class="form-check-label" asp-for="LuceneContentIndexSettings.Stored">@T["Stored"]</label>
<span class="hint dashed">@T["Check to be able to retrieve the value from the index."]</span>
</div>

<div class="form-check">
<input type="checkbox" class="form-check-input" asp-for="LuceneContentIndexSettings.Analyzed" checked="@Model.LuceneContentIndexSettings.Analyzed" />
<label class="form-check-label" asp-for="LuceneContentIndexSettings.Analyzed">@T["Analyzed"]</label>
<span class="hint dashed">@T["Check to analyze the value as readable text."]</span>
</div>
</div>
</div>


Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"DisplayAllContentTypes": true,
"DisplayedContentTypes": []
},
"ContentIndexSettings": {}
"LuceneContentIndexSettings": {}
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
"DisplayAllContentTypes": true,
"DisplayedContentTypes": []
},
"ContentIndexSettings": {}
"LuceneContentIndexSettings": {}
}
}
]
Expand Down
Loading