---
title: More Like This
---
## Basic Usage
Finds documents similar to a given document or set of field values. This is useful for recommendation engines or finding related content based on textual similarities.
You must pass either:
- `document_id`, which takes a [key_field](/documentation/indexing/create_index#choosing-a-key-field) value to match against the corresponding document.
- `document_fields`, which takes a JSON object string to match against.
All other parameters are compatible with both `document_id` and `document_fields`.
When querying with the `document_id` parameter, the index fields must be configured with the
[stored](/documentation/indexing/field_options#all-configuration-options) parameter set to `true`.
The `key_field` of an index is configured automatically as `stored: true`.
```sql Function Syntax
-- document_id
SELECT description, rating, category
FROM mock_items
WHERE id @@@ paradedb.more_like_this(
document_id => 3,
min_term_frequency => 1
);
-- document_fields
SELECT description, rating, category
FROM mock_items
WHERE id @@@ paradedb.more_like_this(
document_fields => '{"description": "shoes"}',
min_doc_frequency => 0,
max_doc_frequency => 100,
min_term_frequency => 1
);
````
```sql JSON Syntax
-- document_id
SELECT description, rating, category
FROM mock_items
WHERE id @@@
'{
"more_like_this": {
"document_id": 3,
"min_term_frequency": 1
}
}'::jsonb;
-- document_fields
SELECT description, rating, category
FROM mock_items
WHERE id @@@
'{
"more_like_this": {
"document_fields": [["description", "shoes"]],
"min_doc_frequency": 0,
"max_doc_frequency": 100,
"min_term_frequency": 1
}
}'::jsonb;
````
The ID of the document to find similar documents to.
A JSON object representing the field values to use for similarity matching.
Minimum document frequency of terms to be considered.
Maximum document frequency of terms to be considered.
Minimum term frequency of terms to be considered.
Maximum number of query terms to be used.
Minimum word length of terms to be considered.
Maximum word length of terms to be considered.
Boost factor to amplify the impact of matching terms.
A JSON array of stop words to be ignored in the query.