mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00
v4.6.6-search test adapt diff search mode (#685)
This commit is contained in:
@@ -24,10 +24,9 @@ export async function initPg() {
|
||||
);
|
||||
`);
|
||||
|
||||
await PgClient.query(`
|
||||
CREATE INDEX CONCURRENTLY IF NOT EXISTS vector_index ON ${PgDatasetTableName}
|
||||
USING hnsw (vector vector_ip_ops) WITH (m = 32, ef_construction = 64);
|
||||
`);
|
||||
await PgClient.query(
|
||||
`CREATE INDEX CONCURRENTLY IF NOT EXISTS vector_index ON ${PgDatasetTableName} USING hnsw (vector vector_ip_ops) WITH (m = 32, ef_construction = 64);`
|
||||
);
|
||||
|
||||
console.log('init pg successful');
|
||||
} catch (error) {
|
||||
|
@@ -80,8 +80,8 @@ const ChatItemSchema = new Schema({
|
||||
});
|
||||
|
||||
try {
|
||||
ChatItemSchema.index({ dataId: -1 });
|
||||
ChatItemSchema.index({ time: -1 });
|
||||
ChatItemSchema.index({ userId: 1 });
|
||||
ChatItemSchema.index({ appId: 1 });
|
||||
ChatItemSchema.index({ chatId: 1 });
|
||||
ChatItemSchema.index({ userGoodFeedback: 1 });
|
||||
|
@@ -86,6 +86,8 @@ export const getSameRawTextCollection = async ({
|
||||
datasetId: string;
|
||||
hashRawText?: string;
|
||||
}) => {
|
||||
if (!hashRawText) return undefined;
|
||||
|
||||
const collection = await MongoDatasetCollection.findOne({
|
||||
datasetId,
|
||||
hashRawText
|
||||
|
Reference in New Issue
Block a user