Skip to content

Commit

Permalink
feat: map relevance score to search document
Browse files Browse the repository at this point in the history
  • Loading branch information
ksavosteev committed Sep 23, 2024
1 parent 7024771 commit 3d6ee18
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="VirtoCommerce.SearchModule.Core" Version="3.800.0" />
<PackageReference Include="VirtoCommerce.SearchModule.Core" Version="3.803.0-alpha.746-vcst-1454" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="8.0.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using VirtoCommerce.ElasticAppSearch.Core.Models.Api.Documents;
using VirtoCommerce.ElasticAppSearch.Core.Models.Api.Schema;
using VirtoCommerce.ElasticAppSearch.Core.Services.Converters;
using VirtoCommerce.SearchModule.Core.Extensions;
using VirtoCommerce.SearchModule.Core.Model;
using SearchGeoPoint = VirtoCommerce.SearchModule.Core.Model.GeoPoint;

Expand Down Expand Up @@ -111,6 +112,8 @@ public SearchDocument ToSearchDocument(Core.Models.Api.Search.Result.SearchResul
searchDocument.Add(indexFieldName, indexFieldValue);
}

searchDocument.SetRelevanceScore(searchResultDocument.Meta?.Score);

return searchDocument;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="VirtoCommerce.Platform.Data" Version="3.800.0" />
<PackageReference Include="VirtoCommerce.Platform.Data" Version="3.825.0" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="8.0.0" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions src/VirtoCommerce.ElasticAppSearch.Web/module.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<version>3.805.0</version>
<version-tag />

<platformVersion>3.800.0</platformVersion>
<platformVersion>3.825.0</platformVersion>
<dependencies>
<dependency id="VirtoCommerce.Search" version="3.800.0" />
<dependency id="VirtoCommerce.Search" version="3.803.0" />
</dependencies>

<apps>
Expand Down

0 comments on commit 3d6ee18

Please sign in to comment.