Skip to content

Commit

Permalink
Add possibility to the index to allow nested field
Browse files Browse the repository at this point in the history
  • Loading branch information
samihafidiDLW committed Aug 1, 2024
1 parent 53443ba commit 78d9eb8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Authors>$(Company)</Authors>
<Copyright>Copyright © $(Company) $([System.DateTime]::Now.Year)</Copyright>
<Trademark>$(Company)™</Trademark>
<VersionPrefix>1.0.4-beta-1</VersionPrefix>
<VersionPrefix>1.0.5-beta-1</VersionPrefix>
<VersionSuffix></VersionSuffix>
<PackageLicenseExpression>MIT</PackageLicenseExpression>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ public class DefaultTypesenseCollectionStrategy : ITypesenseCollectionStrategy
return Task.FromResult<IEnumerable<TypesenseSearchResultModel>?>(result);
}

public virtual Task<ITypesenseCollectionSettings> GetTypesenseCollectionSettings() =>
public virtual Task<ITypesenseCollectionSettings> GetTypesenseCollectionSettings(bool enableNestedFields = false) =>
Task.FromResult<ITypesenseCollectionSettings>(new TypesenseCollectionSettings()
{
EnableNestedFields = enableNestedFields,
Fields = new(){
new Field(BaseObjectProperties.ITEM_GUID, FieldType.String),
new Field(BaseObjectProperties.CONTENT_TYPE_NAME, FieldType.String),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public interface ITypesenseCollectionStrategy
/// <returns>Modified Typesense document.</returns>
Task<IEnumerable<TypesenseSearchResultModel>?> MapToTypesenseObjectsOrNull(ICollectionEventItemModel typesensePageItem);

Task<ITypesenseCollectionSettings> GetTypesenseCollectionSettings();
Task<ITypesenseCollectionSettings> GetTypesenseCollectionSettings(bool enableNestedFields = false);

Task<IEnumerable<ICollectionEventItemModel>> FindItemsToReindex(CollectionEventWebPageItemModel changedItem);

Expand Down

0 comments on commit 78d9eb8

Please sign in to comment.