Vector retrieval

Updated at:

Lindorm supports vector retrieval through search indexes. This topic describes how to perform vector retrieval by using search indexes and SQL.

Prerequisites

Prepare data

Connect to and use LindormTable by using the MySQL CLI. Prepare an SQL table and write sample data.

Connect to LindormTable and create an SQL table

In the following example, the embedding column stores vector data. The vector column is defined as the VECTOR(n) type.

CREATE TABLE product_items (
  id VARCHAR,
  title VARCHAR,
  content VARCHAR,
  category VARCHAR,
  status VARCHAR,
  price DOUBLE,
  embedding VECTOR(8),
  PRIMARY KEY (id)
);

Write sample data

The vector column embedding accepts data in the format of '[...]', which is a floating-point array enclosed by brackets. The following example writes 10 data records. The index creation example uses HNSWQ described below, which can trigger offline index building.

UPSERT INTO product_items (id, title, content, category, status, price, embedding)
VALUES (
  'item_001',
  'Active noise-cancelling Bluetooth headphones',
  'Wireless Bluetooth headphones with active noise cancellation, transparency mode, and long battery life, suitable for commuting and sports',
  'audio',
  'ON_SALE',
  399.00,
  '[0.067985594, 0.94134957, 0.9174301, 0.34755236, 0.3318444, 0.30996937, 0.12764448, 0.9909833]'
);

UPSERT INTO product_items (id, title, content, category, status, price, embedding)
VALUES (
  'item_002',
  'Thin and light laptop',
  '14-inch thin and light laptop, suitable for mobile office, document editing, and online meetings',
  'computer',
  'ON_SALE',
  5299.00,
  '[0.48320667, 0.12729345, 0.86240918, 0.57118409, 0.09480932, 0.69527483, 0.31873674, 0.23437815]'
);

UPSERT INTO product_items (id, title, content, category, status, price, embedding)
VALUES (
  'item_003',
  'True wireless sports earbuds',
  'In-ear sports earbuds with waterproof and sweatproof design, secure fit, suitable for running, fitness, and outdoor training',
  'audio',
  'ON_SALE',
  299.00,
  '[0.08234191, 0.88452947, 0.90317422, 0.39284715, 0.28741066, 0.34491053, 0.16588271, 0.94621736]'
);

UPSERT INTO product_items (id, title, content, category, status, price, embedding)
VALUES (
  'item_004',
  'Mechanical keyboard',
  '87-key Bluetooth dual-mode mechanical keyboard with brown switches, suitable for programmers and office work',
  'computer',
  'ON_SALE',
  269.00,
  '[0.51690823, 0.18346277, 0.80153459, 0.62274118, 0.14639502, 0.73124588, 0.37261894, 0.28194763]'
);

UPSERT INTO product_items (id, title, content, category, status, price, embedding)
VALUES (
  'item_005',
  '4K office monitor',
  '27-inch 4K UHD monitor with USB-C connectivity, suitable for programming, design, and multi-window office work',
  'computer',
  'ON_SALE',
  1599.00,
  '[0.54781264, 0.10893452, 0.83476129, 0.68420137, 0.17266381, 0.76249855, 0.40122976, 0.31508492]'
);

UPSERT INTO product_items (id, title, content, category, status, price, embedding)
VALUES (
  'item_006',
  'Air fryer',
  'Large-capacity oil-free air fryer with multiple cooking modes for fries, chicken wings, egg tarts, and more',
  'home',
  'ON_SALE',
  329.00,
  '[0.73492115, 0.29481763, 0.21837490, 0.81246537, 0.69021458, 0.14763829, 0.52390741, 0.40831672]'
);

UPSERT INTO product_items (id, title, content, category, status, price, embedding)
VALUES (
  'item_007',
  'Robot vacuum cleaner',
  'Smart robot vacuum with laser navigation, auto dust collection, and mopping, suitable for home floor cleaning',
  'home',
  'ON_SALE',
  1699.00,
  '[0.78261493, 0.25173984, 0.19652837, 0.84501926, 0.72148305, 0.11947682, 0.56821344, 0.45290631]'
);

UPSERT INTO product_items (id, title, content, category, status, price, embedding)
VALUES (
  'item_008',
  'Outdoor shell jacket',
  'Windproof, waterproof, and breathable fabric jacket, suitable for hiking, camping, and daily commuting',
  'outdoor',
  'ON_SALE',
  599.00,
  '[0.21469385, 0.67248120, 0.35890274, 0.18673549, 0.82401652, 0.53371908, 0.74258136, 0.29467011]'
);

UPSERT INTO product_items (id, title, content, category, status, price, embedding)
VALUES (
  'item_009',
  'Camping tent',
  'Double-layer rainproof camping tent with spacious interior, suitable for family camping and weekend outdoor activities',
  'outdoor',
  'ON_SALE',
  499.00,
  '[0.23687049, 0.70452813, 0.33147592, 0.15829476, 0.85739241, 0.50468327, 0.79124658, 0.26391844]'
);

UPSERT INTO product_items (id, title, content, category, status, price, embedding)
VALUES (
  'item_010',
  'Children insulated bottle',
  '316 stainless steel children insulated bottle with straw and leak-proof lid, suitable for daily use at school',
  'baby',
  'ON_SALE',
  89.00,
  '[0.39128467, 0.41873925, 0.64208193, 0.24759318, 0.50371684, 0.28645079, 0.19582734, 0.86140952]'
);

Create a search index

Connect to and use LindormTable by using the MySQL CLI. Create a search index that includes vector columns.

For vector columns, use mapping to specify the vector index algorithm, distance algorithm, and other parameters. The following examples use HNSWQ and IVFBQ. For more configuration details, see Connect to and use the vector engine by using curl commands.

Attribute pushdown: If scalar columns participate in vector retrieval, you can configure attribute pushdown for scalar columns to improve retrieval performance. Pushdown consumes vector memory resources. Evaluate which columns to push down based on your business requirements. For more information, see Scalar attribute pushdown: accelerate hybrid retrieval of vector + scalar queries. To use efficient_filter for attribute pushdown, you must complete index training first.

HNSWQ example

CREATE INDEX product_vector_idx USING SEARCH ON product_items (
  id,
  title,
  content(type=text, analyzer=ik),
  category(mapping='{"type": "keyword", "meta": {"_vector_filter": "true"}}'),
  status(mapping='{"type": "keyword", "meta": {"_vector_filter": "true"}}'),
  price(mapping='{"type": "double", "meta": {"_vector_filter": "true"}}'),
  embedding(mapping='{
    "type":"knn_vector",
    "dimension":8,
    "data_type":"float",
    "meta":{
      "offline.construction":"true"
    },
    "method":{
      "name":"hnswq",
      "engine":"lvector",
      "space_type":"l2",
      "parameters":{
        "m":32,
        "ef_construction":400
      }
    }
  }')
) WITH (
  INDEX_SETTINGS='{
    "index.knn.vector_empty_value_to_keep": true
  }'
);
  • For HNSWQ, the data volume must be strictly greater than the vector dimension. After importing existing offline data, trigger one build.

  • Configure attribute pushdown as needed.

IVFBQ example

For IVFBQ, you must write sufficient training data first, and then trigger offline vector index building.

CREATE INDEX product_vector_idx USING SEARCH ON product_items (
  id,
  title,
  content(type=text, analyzer=ik),
  category(mapping='{"type": "keyword", "meta": {"_vector_filter": "true"}}'),
  status(mapping='{"type": "keyword", "meta": {"_vector_filter": "true"}}'),
  price(mapping='{"type": "double", "meta": {"_vector_filter": "true"}}'),
  embedding(mapping='{
    "type":"knn_vector",
    "dimension":8,
    "data_type":"float",
    "meta":{
      "offline.construction":"true"
    },
    "method":{
      "name":"ivfbq",
      "engine":"lvector",
      "space_type":"l2",
      "parameters":{
        "exbits":2,
        "nlist":10000
      }
    }
  }')
) WITH (
  INDEX_SETTINGS='{
    "index.knn.vector_empty_value_to_keep": true
  }'
);
  • Before triggering IVFBQ building, the vector data volume must be greater than 256 records and exceed 30 times the nlist value. We recommend that you import all offline data before triggering the build.

  • Configure attribute pushdown as needed.

Add a vector column to an existing search index

You can add a vector column to an existing index. The procedure is the same as adding a column to a regular index. For more information, see Add a search index column. If the new column has historical data, you must perform a rebuild operation to synchronize the historical data to the index.

The following example adds a vector column.

ALTER TABLE product_items
ADD COLUMN image_vector VECTOR(8);

ALTER INDEX product_vector_idx ON product_items
ADD COLUMNS (
  image_vector(mapping='{
    "type":"knn_vector",
    "dimension":8,
    "data_type":"float",
    "meta":{
      "offline.construction":"true"
    },
    "method":{
      "name":"hnswq",
      "engine":"lvector",
      "space_type":"l2",
      "parameters":{
        "m":32,
        "ef_construction":400
      }
    }
  }')
);

Build vector indexes offline

Trigger building asynchronously

ALTER INDEX product_vector_idx ON product_items
REBUILD VECTOR INDEX ON embedding
WITH (REMOVE_OLD_INDEX=true);
  • (Default) REMOVE_OLD_INDEX=true: deletes the old vector index and rebuilds it. Before the build is complete, KNN queries on this vector column are unavailable. We recommend that you use this mode.

  • REMOVE_OLD_INDEX=false: retains the old vector index during the build. However, the old index continues to consume resources and may affect query performance. We recommend that you set this parameter to true.

Check building progress

SHOW INDEX FROM product_items;

Check the building status of each vector column in the INDEX_VECTOR_BUILD_INFO field in the result. Only the FINISH status indicates a successful build. FAIL and ABORT are also terminal states but do not indicate success.

Abort building

ALTER INDEX product_vector_idx ON product_items
ABORT REBUILD VECTOR INDEX ON embedding;

Only one build task can exist at a time for the same table, search index, and vector column.

Query data

Vector retrieval supports both MySQL and OLAP resource group methods. See the following examples.

Perform vector retrieval through the MySQL protocol

In the MySQL protocol, use vector_distance to specify vector retrieval on search index columns. The actual distance algorithm is determined by the space_type defined in the index mapping.

Pure vector retrieval

SELECT
  id,
  title,
  category,
  price,
  l_search_score() as score
FROM product_items
ORDER BY vector_distance(
  embedding,
  '[0.067985594, 0.94134957, 0.9174301, 0.34755236, 0.3318444, 0.30996937, 0.12764448, 0.9909833]'
)
LIMIT 10;

Vector retrieval with scalar filtering

SELECT /*+ _l_force_vector_index_(lvector.filter_type=efficient_filter) */
  id,
  title,
  category,
  price,
  l_search_score() as score
FROM product_items
WHERE status = 'ON_SALE'
  AND category = 'audio'
ORDER BY vector_distance(embedding, '[0.067985594,0.94134957,0.9174301,0.34755236,0.3318444,0.30996937,0.12764448,0.9909833]')
LIMIT 20;
  • _l_force_vector_index_(lvector.filter_type=efficient_filter) specifies the scalar filtering mode. When set to efficient_filter, the server selects the optimal filtering mode based on the selectivity of the scalar conditions.

Dual-path recall

"Dual-path recall" refers to using both vector retrieval and full-text retrieval in a single query: vector retrieval recalls semantically similar data based on the query vector, and full-text retrieval recalls text-relevant data based on keyword or token matching. After RRF fusion is enabled, the system ranks the results from both paths separately and then fuses them based on the RRF strategy to produce the final result list. For more information about RRF calculation, see Fusion query calculation.

When lvector.hybrid_search_type=filter_rrf is specified, the full-text retrieval conditions in the query are used as the full-text path for RRF by default.

SELECT /*+ _l_force_vector_index_(
           lvector.hybrid_search_type=filter_rrf
       ) */
       id,
       title,
       content,
       price,
       l_search_score() as score
FROM product_items
WHERE match(content) against('wireless Bluetooth headphones noise cancellation')
  AND status = 'ON_SALE'
ORDER BY vector_distance(
           embedding,
           '[0.12,0.08,0.35,0.44,0.19,0.27,0.03,0.91]'
         )
LIMIT 20;

Perform vector retrieval through an OLAP resource group

When querying LindormTable data through an OLAP resource group, use _l_force_vector_index_ to force the use of vector indexes. The OLAP resource group uses distance functions corresponding to the distance type: l2_distance, cosine_similarity, or innerproduct_distance.

Pure vector retrieval

SELECT /*+ _l_force_vector_index_ */
  id,
  title,
  category,
  price,
  _vector_score_(
    embedding,
    '[0.067985594, 0.94134957, 0.9174301, 0.34755236, 0.3318444, 0.30996937, 0.12764448, 0.9909833]'
  ) AS vector_score
FROM product_items
ORDER BY l2_distance(
  embedding,
  '[0.067985594, 0.94134957, 0.9174301, 0.34755236, 0.3318444, 0.30996937, 0.12764448, 0.9909833]'
)
LIMIT 10;

Vector retrieval with scalar filtering

SELECT /*+ _l_force_vector_index_(lvector.filter_type=efficient_filter) */
  id,
  title,
  category,
  price,
  _vector_score_(
    embedding,
    '[0.067985594, 0.94134957, 0.9174301, 0.34755236, 0.3318444, 0.30996937, 0.12764448, 0.9909833]'
  ) AS vector_score
FROM product_items
WHERE status = 'ON_SALE'
  AND category = 'audio'
ORDER BY l2_distance(
  embedding,
  '[0.067985594, 0.94134957, 0.9174301, 0.34755236, 0.3318444, 0.30996937, 0.12764448, 0.9909833]'
)
LIMIT 20;

Dual-path recall

The OLAP resource group uses the lindorm_rrf_rank function to specify dual-path recall queries.

SELECT /*+ _l_force_vector_index_ */
       id,
       title,
       content,
       price,
       _vector_score_(
         embedding,
         '[0.067985594, 0.94134957, 0.9174301, 0.34755236, 0.3318444, 0.30996937, 0.12764448, 0.9909833]'
       ) AS vector_score
FROM product_items
WHERE status = 'ON_SALE'
ORDER BY lindorm_rrf_rank(
           l2_distance(
             embedding,
             '[0.067985594, 0.94134957, 0.9174301, 0.34755236, 0.3318444, 0.30996937, 0.12764448, 0.9909833]'
           ),
           match_against('wireless noise-cancelling headphones', content)
         )
LIMIT 20;

Vector retrieval HINT parameters

Both vector retrieval interfaces support specifying query parameters through the _l_force_vector_index_(...) HINT. The following table describes the supported parameters. For more detailed parameter information, see Connect to and use the vector engine by using curl commands.

Parameter

Default value

Valid values

Description

lvector.ef_search

None

Integer from 1 to 1000

HNSW/HNSWQ query parameter that controls the candidate pool size during queries.

lvector.client_refactor

None

true or false

Specifies whether to enable client-side refactoring for vector queries.

lvector.min_score

None

Floating-point number from 0.0 to 1.0

Vector similarity filter threshold.

lvector.nprobe

None

Positive integer

IVF algorithm query parameter that controls the number of clusters to search.

lvector.reorder_factor

None

Integer from 1 to 200

Query result reranking parameter.

lvector.filter_type

post_filter

pre_filter, post_filter, or efficient_filter (recommended)

Specifies the combination mode of vector retrieval and filter conditions.

lvector.hybrid_search_type

None

filter_rrf

Enables RRF fusion of full-text recall and vector recall.

lvector.rrf_rank_constant

None

Positive integer

The rank constant in the RRF ranking formula. Defaults to the underlying RRF parameter.

lvector.rrf_window_size

None

Positive integer

RRF full-text recall window size. If not set, the underlying layer uses topK.

lvector.rrf_knn_weight_factor

None

Floating-point number from 0.0 to 1.0

Weight factor of vector recall relative to full-text recall in RRF.

lvector.cursor_mode

None

stateless, global_sort, or region_sort

Vector cursor mode.

Automatic embedding on write

If the raw data consists of text, images, or other multimodal content, you can call an embedding model through the search engine pipeline (synchronous mode) or the stream engine ETL (asynchronous mode) to generate vectors and write them to LindormTable vector columns.

Automatic embedding through the search engine pipeline

You can use the search engine pipeline to implement automatic embedding for text and images.

Create a LindormTable

The default dimension of the text-embedding-v4 model is 1024. When creating the table, set the vector dimension to 1024.

CREATE TABLE product_items (
  id VARCHAR,
  title VARCHAR,
  content VARCHAR,
  category VARCHAR,
  status VARCHAR,
  price DOUBLE,
  embedding VECTOR(1024),
  PRIMARY KEY (id)
);

Configure the write embedding pipeline

Create a write embedding pipeline. The pipeline must be created by calling search engine API operations. The following example creates a pipeline that calls the text-embedding-v4 model through the Bailian API for text embedding. Replace Search engine URL and AI engine URL in the example with the actual search engine and AI engine URLs of your instance.

curl -u <username>:<password> -H "Content-Type: application/json" -XPUT "http://<Search engine URL>/_ingest/pipeline/write-embedding-pipeline" -d '{
  "description": "demo embedding pipeline",
  "processors": [
    {
      "text-embedding": {
        "inputFields": ["content"],
        "outputFields": ["embedding"],
        "userName": "root",
        "password": "test****",
        "url": "http://<AI engine URL>/dashscope/compatible-mode/v1/embeddings",
        "modeName": "text-embedding-v4"
      }
    }
  ]
}'

For more information about the parameters, see Automatic embedding: write and query methods.

Create a search index that references the pipeline

Create a search index that references the pipeline created in the previous step. Data writes trigger automatic embedding. Make sure that the vector dimension matches the embedding output dimension. The following example uses 1024 dimensions.

CREATE INDEX product_vector_idx USING SEARCH ON product_items (
  id,
  title,
  content(type=text, analyzer=ik),
  category(mapping='{"type": "keyword", "meta": {"_vector_filter": "true"}}'),
  status(mapping='{"type": "keyword", "meta": {"_vector_filter": "true"}}'),
  price(mapping='{"type": "double", "meta": {"_vector_filter": "true"}}'),
  embedding(mapping='{
    "type":"knn_vector",
    "dimension":1024,
    "data_type":"float",
    "meta":{
      "offline.construction":"true"
    },
    "method":{
      "name":"hnswq",
      "engine":"lvector",
      "space_type":"l2",
      "parameters":{
        "m":32,
        "ef_construction":200
      }
    }
  }')
) WITH (
  INDEX_SETTINGS='{
    "index.knn.vector_empty_value_to_keep": true,
    "default_pipeline": "write-embedding-pipeline"
  }'
);

Write sample data

Unlike the previous method, you do not need to explicitly specify vector column data. Only write data to text columns, and index synchronization automatically completes vectorization.

The following is only a write example. When using the HNSWQ index, make sure to write no less than the number of dimensions (1024) of data, and trigger offline index building before performing query tests.

UPSERT INTO product_items
  (id, title, content, category, status, price)
VALUES
  ('p001', 'Wireless noise-cancelling headphones', 'Active noise cancellation, transparency mode, and long battery life, suitable for commuting and office use', 'Digital accessories', 'ON_SALE', 399.00);

UPSERT INTO product_items
  (id, title, content, category, status, price)
VALUES
  ('p002', 'Mechanical keyboard', '87-key Bluetooth dual-mode mechanical keyboard with brown switches, suitable for programmers and office work', 'Computer peripherals', 'ON_SALE', 269.00);

UPSERT INTO product_items
  (id, title, content, category, status, price)
VALUES
  ('p003', 'Children insulated bottle', '316 stainless steel, with straw and leak-proof lid, suitable for daily use at school', 'Baby products', 'ON_SALE', 89.00);

UPSERT INTO product_items
  (id, title, content, category, status, price)
VALUES
  ('p004', 'Air fryer', 'Large-capacity oil-free air fryer with multiple cooking modes for fries, chicken wings, egg tarts, and more', 'Kitchen appliances', 'ON_SALE', 329.00);

UPSERT INTO product_items
  (id, title, content, category, status, price)
VALUES
  ('p005', 'Outdoor shell jacket', 'Windproof, waterproof, and breathable fabric, suitable for hiking, camping, and daily commuting', 'Sports and outdoor', 'ON_SALE', 599.00);

Asynchronous vectorization through the stream engine ETL

For more information, see Asynchronous vectorization.

Query with automatic embedding

For queries, you can use the vector_embedding function of LindormTable to vectorize text and then perform vector retrieval with the resulting vector.

SELECT vector_embedding(
  'text-embedding-v4',
  'Wireless noise-cancelling headphones, suitable for commuting and office use',
  1024
) AS query_vector;
SELECT
  id,
  title,
  category,
  price,
  l_search_score() as score
FROM product_items
ORDER BY vector_distance(
  embedding,
  '[0.02459293, -0.018794596, 0.028363274, -0.024921406, 0.10973988, -0.03221931, -0.035561204, 0.00754783, -0.050128445, 0.07352172, 0.05035695, 0.0067623416, 0.042844824, -0.018237613, 0.025821147, -0.05618385, -0.0080405455, -0.0493858, -0.03684655, 5.6099944E-4, 0.018351866, 0.07375023, 0.07295045, -0.032647755, 0.012446421, 0.045415513, 0.05789764, -0.046215285, -0.048157584, 0.0027724172, 0.054013044, -0.060268387, -0.014195919, -0.02734928, -0.029105918, 0.010539827, 0.024035947, 0.04430155, 0.011625229, 0.050642584, -0.023921695, -0.019065946, 0.01936586, -0.0017611008, -0.034590054, -0.002113678, -2.0529811E-4, -0.030591205, -0.0048450357, -0.05238494, 0.03321902, 0.019908562, -0.014345876, -0.016381005, 0.022150775, -0.0028616772, 0.04353034, 0.02930586, 0.001092543, 0.01358895, -0.0014718983, 0.020979682, -0.026606636, -0.050214134, 0.011253907, -0.077120684, -0.0062124995, 0.042130746, -0.011089669, -0.03664661, 0.017537815, 0.023507528, 0.06895161, -0.02282201, 0.004652234, 0.05729781, 0.027449252, 0.05612672, -0.0040988214, 0.033019077, -0.0012237553, -0.091230914, -0.0070586847, -0.03010563, 0.011196781, 0.010275617, -0.02956293, 0.06580965, 0.013246192, 0.08100528, -0.007094389, -0.0024457255, -0.054841377, 0.017694913, -0.021408131, 0.07637804, -0.03516132, 0.050499767, -0.015238476, 0.045158446, -0.005662658, -0.039474364, 0.0030473382, -0.026620917, 0.020137068, 0.006108958, -0.026992239, -0.014417283, -0.010604094, -0.022265028, 0.014795747, -0.030676894, -0.0046058185, 0.026049653, -0.0026063935, -0.013974554, 0.00648385, -0.025335573, -0.025678331, 0.041245285, -0.0024635775, 0.06152517, -0.006191077, -0.03381885, 0.014781465, -0.024650056, 0.03313333, -0.022936262, 0.0027188612, 0.03133385, -0.033418965, -0.018894568, 0.010289899, -0.012674928, 0.04784339, -0.012717772, 0.056041032, 0.009882873, 0.005719784, -8.729633E-4, 0.027220745, 0.0031901542, 0.0066909334, 0.026035372, 0.05027126, -0.061696548, -0.0020636923, -0.02343612, -0.028634625, -0.0035936097, -0.035047065, 0.027991952, -0.03453293, 0.023864567, 0.067866206, -0.0314481, 0.011668074, 0.025164194, -0.013574669, -0.017223619, -0.027749166, 0.028691752, -0.06215356, -0.007333606, -0.018894568, -0.012646364, -0.014838591, -0.02984856, 0.021422412, 0.006119669, -0.016809452, 0.023607498, 0.03276201, -0.001137173, 0.021922268, 0.030933963, 0.042702008, 0.05558402, -0.011653792, 0.0012969485, 0.036389537, 0.009954281, 0.06341034, 0.021879423, 0.042473502, -0.025706895, -0.00754783, 0.07026552, -0.01686658, -0.013174783, -0.010789755, 0.085575394, 0.029362986, 0.05958287, 0.08740345, -0.035446953, -0.041673735, 0.047900513, 0.073921606, -0.019451551, 0.014360157, -0.056326665, -0.009283045, 0.04304477, 0.019665774, 0.013367586, 0.024078792, -0.02664948, -0.032076493, -0.011860875, 0.0065302653, 1.6858992E-4, 0.035818275, -0.002522489, -0.049785685, 0.008818893, -0.02060836, -0.0069372915, 0.024921406, -0.054384366, 0.015338447, -0.0383604, -0.052499194, 0.0076406603, -0.012325028, 0.029591493, -0.013667499, -0.04430155, 0.026292441, 0.0562981, 0.005655517, -0.024264453, -0.044244424, -0.07112241, -0.03561833, -0.0082761925, 0.0035097052, -0.021993676, -0.05167086, -0.0253927, 0.02353609, 0.013717485, -0.037075054, 0.059182987, -0.029220171, -0.023093361, 0.006633807, -0.015824022, 0.06403873, 0.027020803, -0.016709482, 0.012824885, 0.038931664, -0.032476377, 0.0117109185, 0.009004554, 0.027806291, 0.03807477, -0.039445803, 0.03776057, -0.029620055, 0.036275286, -0.014074525, -0.015152787, -0.008926005, 0.04610103, 0.020165632, 0.0064302944, -0.053927355, 0.033676032, -0.0077477726, 3.9653777E-4, -2.5662265E-4, -9.4258616E-4, 0.051356662, 0.019280171, 0.0036703732, -0.044272985, -0.037589192, 0.00470579, 0.005019985, -0.008161939, -0.0014228052, -0.0073407465, 0.0028348994, -9.3366014E-4, -0.007940575, 0.0036846548, -0.009375876, -0.017223619, -0.038588904, 0.041816548, -0.021351004, 0.0073407465, -0.005409159, -0.03416161, 0.04698649, -0.002683157, -0.040445514, -0.009597241, -0.010525545, -0.003952435, -0.03161948, 0.023521809, 0.0015040318, 0.03481856, -0.0019904992, -0.04153092, 0.050471205, -0.009361594, -0.03124816, 0.03481856, -0.01492428, -0.00896885, 0.0025671192, -0.027506378, -0.058097582, -0.04641523, 0.016281033, -0.07460712, -0.02203652, -0.07814896, 0.041502353, 0.027492097, 0.010011408, 0.013603232, 0.0031812282, -0.009254483, -0.026149625, -0.035475515, -0.02086543, 0.01936586, 0.015838305, 0.04358747, -0.0229077, 0.017180774, 0.03513276, 0.06746632, -0.03436155, 0.032190744, -0.009511551, -0.0010586242, -0.043844536, -0.040359825, 0.044244424, -0.0051270975, 0.02513563, -0.016123936, -0.025549797, 0.03801764, -0.03224787, 0.020851148, -0.010175646, 0.04838609, 0.0253927, 0.020137068, 0.0246929, 0.014338735, -0.01952296, -0.0024582217, 0.041816548, 0.012574956, -0.026249597, -0.0035543353, 0.041787986, 0.035646893, 0.019151637, -0.012189353, -0.08009126, 0.02654951, -0.012096522, -0.083176084, -0.019651493, 0.004980711, 0.015224194, 0.04015988, 0.003170517, -0.0103970105, -0.0010943282, 0.037589192, -0.046815112, 0.01393885, -0.013817456, -0.005659087, 0.014795747, -0.013774611, 0.044330113, -0.02406451, -0.04055977, 0.0027367133, 0.032904826, 0.024621492, -0.00968293, -0.0064053014, 0.006198218, 0.0053234696, 0.016795171, 0.024450114, -0.019437268, 0.03721787, 0.008361882, -0.040245574, -0.017780602, 0.0077263503, 0.0047272122, -0.04307333, 0.047557756, -0.011168217, 0.019237326, -0.0091687925, -0.048985917, -0.034332987, -0.019465832, -0.009797183, -0.036875114, 0.008561824, 0.0023868138, 0.0012621371, 0.08031976, 0.013139079, -0.008397586, 0.038131893, -0.01109681, -0.0036043208, -0.04153092, 0.11573815, -0.031390976, 0.0024921407, 2.3229928E-4, 0.0040024207, 0.062324937, -0.018209051, -0.07792045, -0.019480113, 0.021465257, 0.0077834767, -0.014274468, -0.0073907324, -0.017280746, 0.009083102, -0.0033972375, 0.0069230096, 0.0029902118, 0.016838016, 0.03907448, 0.073864475, 0.021636637, -0.018594654, 0.0030509087, -0.032619193, -0.04404448, -0.04787195, -0.012360732, -0.006680222, 0.008997413, 0.004841465, 0.026321003, 0.0025974675, -0.023550373, 0.014624367, 0.021393849, -0.015381292, -0.05975425, 0.03624672, 0.019994251, -0.01500997, 0.041702297, 0.01979431, -0.0036810846, -0.0038024783, 0.01563836, 0.024021665, -0.04173086, -0.0014683278, 0.0062303515, -0.060496893, 0.0051449495, 0.040017065, -0.0028009804, 0.067809075, -0.002922374, 0.02440727, 0.009911437, 0.004570115, -0.055955343, 0.014267326, -0.004402306, -9.729346E-4, -0.018723188, -6.0919987E-4, -0.008354741, -0.011082528, 0.0077834767, 0.012210775, -0.030962527, 0.04918586, 0.004234497, 0.044787124, -0.001038987, -0.033019077, -0.008119094, 0.019722901, -0.032162182, -0.0013478268, -0.0018798166, 2.479198E-4, -0.036703732, -0.01011852, 0.0055019897, -0.0074907034, -0.014117369, -0.036903676, -0.029991377, 0.020594079, 0.027092211, 0.028220458, -0.005209217, 0.028748877, -0.035532642, -0.02105109, -0.020379854, 0.016966552, 0.03730356, -0.0011068246, -0.013638936, -0.020022815, 0.01829474, -0.010089956, 0.04264488, -0.021865143, 0.017266465, 0.0020922555, -0.035218447, -0.019651493, -0.022850573, -0.043358963, 0.026235314, 0.013160502, -0.061410915, 0.010632657, 0.068037584, 0.026606636, 0.009575819, 0.0136317955, -0.027991952, -0.020051379, 0.021008246, -0.010018548, -0.0115252575, -0.03713218, 0.033333275, -0.011582384, 0.02202224, 0.048243273, -0.011753764, -0.0028366845, 0.009547255, 0.00781918, 0.04644379, -0.021151062, 0.001349612, 0.010696924, -0.03107678, -0.03818902, 0.061410915, -0.06443862, -0.0628962, -0.08151942, -0.04895735, 0.009997126, 0.040188447, 0.03319046, -0.016937988, 0.01678089, 0.046129595, 0.03267632, 0.036360975, 0.027292153, 0.06695218, 0.047357813, 0.0016298885, -0.034018792, 0.008133376, 0.03473287, 0.007469281, 0.010604094, -0.0061410917, 0.0066980743, 0.0071872193, 0.008890301, 0.007583534, -0.01730931, -0.021022527, 0.01838043, -0.021965114, -0.051899366, 0.018466119, 0.05444149, 0.016623791, 0.051385228, -0.03527557, -0.031419538, 0.014124511, 0.0053163287, 0.025292728, -0.02477859, -0.038217586, -0.029705746, 0.032619193, -0.023636062, 0.06003988, -0.010611235, -0.016466694, -0.009011695, -0.01047556, -0.0035543353, -0.009040258, 0.026606636, 0.024607211, 0.0024671478, -0.03213362, 0.017280746, -0.038417526, -0.02326474, -0.0013728196, 0.020108504, 0.018351866, -0.009275905, 0.027520658, -0.008376163, -0.006526695, 0.010468419, -0.012760617, -0.03718931, 0.017494971, -0.0036275284, -0.013403289, -0.014003117, 0.012981982, 0.040274136, 0.012517829, 0.012389295, 0.0068158978, -0.025578361, 0.04724356, 0.060782526, 0.006623096, -0.05675511, 0.0031473094, 0.0145601, 0.039103042, -0.06295333, 0.04981425, -0.01688086, 0.05175655, 0.010089956, 0.02939155, -0.022350717, 0.008597529, 0.0136317955, 0.044758562, -0.034590054, 0.0025653339, -0.024392987, 0.07420724, -0.0018030531, 0.039817125, 0.03558977, -0.014710057, 0.033161893, -0.02157951, -0.02272204, 0.06329609, -0.0044772844, 0.004555833, -0.011646652, 0.003231214, 0.03941724, 0.05372741, -0.010025689, -0.056326665, 0.0017057596, -0.02494997, -0.0042666304, -0.002902737, 0.0024135918, -0.03613247, 0.03684655, 0.0051021045, 0.012232197, 0.052956205, -0.0058019035, 0.0015923993, 0.025207039, -0.0041309553, -0.026749453, 0.052984767, 0.025592642, 0.0061053876, 0.015524108, 0.019065946, 0.0035132756, -0.07574965, 0.003400808, -0.028006233, -0.015652644, 0.030591205, -0.01713793, 0.014274468, -0.006855172, -0.0626677, -0.019465832, -0.018866004, 0.016623791, -0.011046824, 0.013367586, -0.027920544, 0.018394712, 0.003488283, -0.0039738575, 0.02317905, 0.021251034, -0.0105826715, -0.029362986, -0.045586895, 0.039302986, 0.0075763934, -0.015681205, 0.020379854, 0.07609241, -0.077120684, -0.057412066, -0.04847178, 0.041930802, 0.008568965, 0.0071622264, 0.013417571, 0.03161948, -0.035646893, 0.004077399, -0.019237326, 0.0054734265, -0.012296465, -0.0049592885, 0.13047677, -0.015367011, 0.012667786, 0.017966263, 0.033704598, -0.018194769, 0.010968275, 0.026178189, -0.038960226, 0.053613156, -0.019651493, 0.0022457829, 0.022893418, -0.006648089, 0.013660358, -0.003809619, -0.011953706, -0.05512701, 0.012325028, 0.0012541037, -0.012203635, 5.132453E-4, 0.009075962, 0.029705746, -0.07637804, 0.02566405, 0.0017566378, -0.031133907, -0.016923705, -0.0019601507, 0.020751176, 0.008033405, -0.029148763, -0.011168217, -0.03710362, 0.028534653, -0.002583186, 0.03187655, -0.031219596, -0.009225919, 0.024550084, 0.012025114, -0.014638648, -0.021450976, 0.020365573, -0.044615746, -0.014060243, -0.012653505, 0.0246929, -0.020179912, 0.02060836, 0.030905401, 0.010639798, 0.061582293, 0.025321292, -0.0035097052, -0.004370172, 0.032447815, 0.023279022, -0.0035329128, -0.0075978157, 0.0041273846, -0.036903676, 0.050756834, -0.009468706, -0.005005704, 0.0068516014, -0.039331548, 0.03170517, -0.049957067, -0.014952844, 0.018009108, -0.05407017, -0.004223786, -0.032447815, 0.009375876, 0.0070586847, 0.00728005, -0.016181063, -0.006173225, 0.00506283, -0.004752205, -0.034504365, 0.033333275, -0.040017065, -0.02077974, 0.07272195, 0.013653218, -0.01713793, 0.0031223167, 0.020708332, 0.008004841, -0.003088398, 0.021122498, -0.010618376, -0.036360975, 5.7617365E-4, -0.044244424, -0.004909303, -0.015738333, -0.008176221, 0.018780315, 0.05061402, 6.5204466E-4, -0.010518405, 0.005369885, -0.08483275, -0.001722719, -0.032504942, 0.046929363, 0.0020226329, 0.018051952, 0.011039684, -3.2847698E-4, -0.0040202728, 0.01509566, -0.0056019607, -0.010596953, 0.031847987, 0.071522295, 0.016223907, -0.016366724, 0.05335609, 0.009425862, 0.026006809, -0.022507815, -0.0114252865, -0.034447238, -0.021793734, 0.03958862, 0.01047556, -0.05124241, -2.2326171E-4, -0.012860589, -0.039274424, 0.008868879, 0.013503261, -0.035047065, -0.024378706, 0.010754051, -0.008311896, -0.016195344, -0.045329824, -0.0036096766, -0.015752614, 0.051013906, 0.013638936, 0.033447526, 0.014274468, 0.0034650753, 0.03664661, -0.008997413, 0.02086543, -0.006330323, -0.049128734, -0.013089094, 8.90369E-4, -0.016081091, 0.019394424, -0.007733491, -0.006648089, -0.010811177, -0.033161893, -0.015923994, 0.035761148, -0.04678655, -0.037503503, 0.014281608, -0.0056519466, 0.0069194394, 0.00399528, 0.0054484336, -0.0015093875, -0.02406451, -0.019680057, 0.0038310415, 0.014810028, -0.022921981, 0.0051128156, 0.018537527, -0.006972995, 0.031019654, 0.050728273, -0.042587757, 0.0035936097, 0.006633807, -0.008890301, -0.013931709, 0.019051665, 0.025249884, -0.040902525, 9.0241915E-4, 0.02564977, -0.012110804, 7.185434E-4, 0.012496407, -0.030448388, -0.064324364, 0.0241502, -0.058383215, 0.06403873, -0.051213846, 0.029248733, -0.03507563, 0.004680797, 0.06820896, -0.07437862, -0.052613445, 0.025464108, 0.0021600933, 0.053584594, 0.031505227, -0.005826896, 0.022836292, -0.0068658832, -0.030419827, 0.010711206, 0.036532354, -0.0116609335, 0.009540115, -0.0040988214, -0.022122212, -0.0028741737, -0.038874537, -0.020379854, 0.018323304, 0.021450976, 0.021208188, 0.024792872, -0.02939155, -0.03801764, -0.06038264, -0.040245574, -0.03347609, 0.029177327, 0.01358895, 0.02103681, 0.0049557183, -0.004502277, -0.031933676, 0.012739195, -0.052984767, 0.018508965, -0.051270973, -0.013010546, 0.067809075, -0.011546681, 0.027306436, 0.008333319, -0.047700573, 0.037075054, 0.02343612, -0.017437844, -0.061696548, -0.010861163, 0.017637786, 0.011218203, 0.028263303, 0.06278195, 0.022179337, -5.003026E-4, 0.055526894, -0.011125373, 0.010896867, -0.040274136, -0.020322729, -0.0023832433, 0.02317905, 0.049785685, -0.039560053, 0.041388102, 0.037617758, 0.001105932, 0.00470579, -0.0023689617, 0.0057483474, -0.02255066, 0.04750063, 4.054638E-4, 0.03276201]'
)
LIMIT 10;
+------+--------------------------------+---------------------+-------+---------------------+
| id   | title                          | category            | price | score               |
+------+--------------------------------+---------------------+-------+---------------------+
| p001 | Wireless noise-cancelling      | Digital accessories | 399.0 |  0.7290722727775574 |
|      | headphones                     |                     |       |                     |
| p005 | Outdoor shell jacket           | Sports and outdoor  | 599.0 | 0.47925230860710144 |
| p003 | Children insulated bottle      | Baby products       |  89.0 | 0.46468326449394226 |
| p002 | Mechanical keyboard            | Computer peripherals| 269.0 |  0.4509061872959137 |
| p004 | Air fryer                      | Kitchen appliances  | 329.0 |  0.4198461174964905 |
+------+--------------------------------+---------------------+-------+---------------------+
5 rows in set (0.04 sec)