|
@@ -17,6 +17,7 @@ import {
|
|
|
deletePointsByFilter,
|
|
deletePointsByFilter,
|
|
|
scrollPoints,
|
|
scrollPoints,
|
|
|
getCollectionName,
|
|
getCollectionName,
|
|
|
|
|
+ generatePointId,
|
|
|
initializeStoreCollections,
|
|
initializeStoreCollections,
|
|
|
generateEmbeddingBatch,
|
|
generateEmbeddingBatch,
|
|
|
createProductText,
|
|
createProductText,
|
|
@@ -197,7 +198,7 @@ async function syncProductsToQdrant(
|
|
|
|
|
|
|
|
// Convert products to Qdrant points with embeddings
|
|
// Convert products to Qdrant points with embeddings
|
|
|
const points: QdrantPoint[] = products.map((product, index) => ({
|
|
const points: QdrantPoint[] = products.map((product, index) => ({
|
|
|
- id: `woocommerce-${storeId}-${product.id}`,
|
|
|
|
|
|
|
+ id: generatePointId('woocommerce', storeId, product.id),
|
|
|
vector: embeddings[index],
|
|
vector: embeddings[index],
|
|
|
payload: {
|
|
payload: {
|
|
|
store_id: storeId,
|
|
store_id: storeId,
|
|
@@ -302,7 +303,7 @@ async function syncOrdersToQdrant(
|
|
|
|
|
|
|
|
// Convert orders to Qdrant points with embeddings
|
|
// Convert orders to Qdrant points with embeddings
|
|
|
const points: QdrantPoint[] = orders.map((order, index) => ({
|
|
const points: QdrantPoint[] = orders.map((order, index) => ({
|
|
|
- id: `woocommerce-${storeId}-${order.id}`,
|
|
|
|
|
|
|
+ id: generatePointId('woocommerce', storeId, order.id),
|
|
|
vector: embeddings[index],
|
|
vector: embeddings[index],
|
|
|
payload: {
|
|
payload: {
|
|
|
store_id: storeId,
|
|
store_id: storeId,
|
|
@@ -411,7 +412,7 @@ async function syncCustomersToQdrant(
|
|
|
|
|
|
|
|
// Convert customers to Qdrant points with embeddings
|
|
// Convert customers to Qdrant points with embeddings
|
|
|
const points: QdrantPoint[] = customers.map((customer, index) => ({
|
|
const points: QdrantPoint[] = customers.map((customer, index) => ({
|
|
|
- id: `woocommerce-${storeId}-${customer.id}`,
|
|
|
|
|
|
|
+ id: generatePointId('woocommerce', storeId, customer.id),
|
|
|
vector: embeddings[index],
|
|
vector: embeddings[index],
|
|
|
payload: {
|
|
payload: {
|
|
|
store_id: storeId,
|
|
store_id: storeId,
|