Skip to content

Commit

Permalink
Backmerge: epam#1161 - bingo unable to index on sql server (epam#1875)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderSavelyev authored Mar 25, 2024
1 parent 1810424 commit 58142a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bingo/sqlserver/Source/Bingo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1427,7 +1427,10 @@ private static void prepareContext (SqlConnection connection, string bingo_schem
BingoConfig.getInt(connection, bingo_schema, "reject-invalid-structures", id));
BingoCore.setConfigInt("ignore-bad-valence",
BingoConfig.getInt(connection, bingo_schema, "ignore-bad-valence", id));

BingoCore.setConfigInt("ct_format_save_date",
BingoConfig.getInt(connection, bingo_schema, "ct_format_save_date", id));
BingoCore.setConfigBin("CT_FORMAT_MODE",
Encoding.ASCII.GetBytes(BingoConfig.getString(connection, bingo_schema, "CT_FORMAT_MODE", id)));
if ((flags & ContextFlags.NTHREADS) != 0)
{
BingoCore.setConfigInt("nthreads",
Expand Down Expand Up @@ -1457,6 +1460,8 @@ private static void prepareContext (SqlConnection connection, string bingo_schem
BingoCore.setConfigInt("FP_SIM_SIZE",
BingoConfig.getInt(connection, bingo_schema, "FP_SIM_SIZE", id));

BingoCore.setConfigBin("SIMILARITY_TYPE",
Encoding.ASCII.GetBytes(BingoConfig.getString(connection, bingo_schema, "SIMILARITY_TYPE", id)));
BingoCore.setConfigInt("SUB_SCREENING_MAX_BITS",
BingoConfig.getInt(connection, bingo_schema, "SUB_SCREENING_MAX_BITS", id));
BingoCore.setConfigInt("SIM_SCREENING_PASS_MARK",
Expand Down
3 changes: 3 additions & 0 deletions bingo/sqlserver/sql/bingo_create.sql
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ insert into [$(bingo)].CONFIG values(0, 'FP_SIM_SIZE', '8');
insert into [$(bingo)].CONFIG values(0, 'SUB_SCREENING_MAX_BITS', '8');
insert into [$(bingo)].CONFIG values(0, 'KEEP_CACHE', '0');
insert into [$(bingo)].CONFIG values(0, 'SIM_SCREENING_PASS_MARK', '128');
insert into [$(bingo)].CONFIG values(0, 'SIMILARITY_TYPE', 'SIM');
insert into [$(bingo)].CONFIG values(0, 'CT_FORMAT_SAVE_DATE', '1');
insert into [$(bingo)].CONFIG values(0, 'CT_FORMAT_MODE', 'AUTO');
go

create table [$(bingo)].CONFIG_BIN (n int not null, name varchar(100) not null, value varbinary(max), primary key(n, name));
Expand Down

0 comments on commit 58142a1

Please sign in to comment.