PGroonga.EntityFrameworkCore
3.1.0
npgsql.entityframeworkcore.postgresql에 대한 pgroonga 확장 (postgresql / npgsql 엔티티 프레임 워크 핵심 제공자). EntityFramework Core, PostgreSQL 및 Groonga를 통해 전체 텍스트 검색, 특히 중국어, 일본어 등을 수행 할 수 있습니다.


EF.Functions.Pgroonga* aspnet/entityFrameworkCore#13454로 인해 Npgsql.EntityFrameworkCore.PostgreSQL > = 2.2.6 및> = 3.0.1에서만 작동합니다.
public class ApplicationDbContext : DbContext
{
// ...
protected override void OnModelCreating ( ModelBuilder modelBuilder )
{
base . OnModelCreating ( modelBuilder ) ;
// ...
modelBuilder . Entity < Post > ( )
. HasIndex ( g => g . Content )
. HasMethod ( "pgroonga" )
. HasOperators ( "pgroonga_varchar_full_text_search_ops_v2" ) ;
}
}
public class Startup
{
// ...
public void ConfigureServices ( IServiceCollection services )
{
services . AddDbContextPool < ApplicationDbContext > ( options =>
options . UseNpgsql ( Configuration . GetConnectionString ( "DefaultConnection" ) ,
builder => builder . UsePGroonga ( ) ) ) ;
// ...
}
}
var posts = await _dbContext . Posts . Where ( g => g . Content . SimilarSearch ( q ) )
. OrderByDescending ( g => EF . Functions . PgroongaScore ( ) )
. ToArrayAsync ( ) ; 자세한 내용은 PGroongaLinqExtensions 및 PGroongaDbFunctionsExtensions 참조하십시오.
LIKELIKE ILIKEILIKE 와 동일합니다 &@ 성냥 &@~ 쿼리 &@* 비슷한 검색 &` ScriptQuery &@| 매칭 &@~| 쿼리 &^ 접두사 검색 &^~ prefixrksearch &^| 접두사 검색 &^~| Prefixrksearchin &~ regexpmatch pgroonga_commandpgroonga_command_escape_valuepgroonga_escapepgroonga_flushpgroonga_highlight_htmlpgroonga_is_writablepgroonga_match_positions_bytepgroonga_match_positions_characterpgroonga_normalizepgroonga_query_escapepgroonga_query_expandpgroonga_query_extract_keywordspgroonga_set_writablepgroonga_scorepgroonga_snippet_htmlpgroonga_table_namepgroonga_wal_applypgroonga_wal_truncateMIT 라이센스
자세한 정보는 라이센스를 참조하십시오