This commit is contained in:
2020-05-20 16:48:40 +00:00
parent 42803bb0d8
commit 463084e99e
3 changed files with 28 additions and 13 deletions

View File

@@ -827,6 +827,29 @@ ON CONFLICT IDEA
{
if (!ExistingKeywordMatches.ContainsValue(KeyWord))
{
/*
NEW IDEA
todo: Search indexing performance improvement and exception avoidance (Search.cs 828)
ON CONFLICT IDEA
https://www.postgresql.org/docs/current/sql-insert.html#SQL-ON-CONFLICT
Idea: do the insert manually with the clause "on conflict do nothing"
if detect it hasn't inserted (conflict) trigger a fetch instead
like what is being done now but won't have the exception to deal with!!
ON CONFLICT IDEA
https://www.postgresql.org/docs/current/sql-insert.html#SQL-ON-CONFLICT
Idea: do the insert manually with the clause "on conflict do nothing"
if detect it hasn't inserted (conflict) trigger a fetch instead
like what is being done now but won't have the exception to deal with!!
//NEED TO BASELINE THIS SHIT
*/
//algorithm: Attempt to add it to the db and get the id, if it fails with the expected exception for a duplicate word insertion attempt, then immediately read back that word and handle it
//ATTEMPT TO ADD THE WORD TO THE SEARCHDICTIONARY