fix(search): recall meaage ignore
This commit is contained in:
@@ -511,7 +511,7 @@ func (ds *DataSource) SearchMessages(ctx context.Context, req *model.SearchReque
|
||||
return errors.QueryFailed("cleanup temp table", err)
|
||||
}
|
||||
|
||||
insertSQL := fmt.Sprintf(`INSERT INTO chatlog_msg_base(seq, content)
|
||||
insertSQL := fmt.Sprintf(`INSERT OR IGNORE INTO chatlog_msg_base(seq, content)
|
||||
SELECT sort_seq, CAST(message_content AS TEXT)
|
||||
FROM %s
|
||||
WHERE create_time >= ? AND create_time <= ?
|
||||
|
||||
@@ -547,7 +547,7 @@ func (ds *DataSource) SearchMessages(ctx context.Context, req *model.SearchReque
|
||||
args = append(args, talker)
|
||||
}
|
||||
|
||||
insertSQL := fmt.Sprintf(`INSERT INTO chatlog_msg_base(seq, content)
|
||||
insertSQL := fmt.Sprintf(`INSERT OR IGNORE INTO chatlog_msg_base(seq, content)
|
||||
SELECT Sequence, StrContent FROM MSG WHERE %s`, strings.Join(conditions, " AND "))
|
||||
if _, err := tx.ExecContext(ctx, insertSQL, args...); err != nil {
|
||||
return errors.QueryFailed("insert temp base", err)
|
||||
|
||||
Reference in New Issue
Block a user