2024-01-07 14:58:15 +00:00
|
|
|
---
|
|
|
|
sidebar_position: 3
|
|
|
|
---
|
2023-07-21 05:34:25 +00:00
|
|
|
|
2024-01-07 14:58:15 +00:00
|
|
|
# Advanced Usage
|
2023-11-16 23:26:03 +00:00
|
|
|
|
2024-02-04 10:19:46 +00:00
|
|
|
## Query Filters
|
2023-08-28 17:43:17 +00:00
|
|
|
|
|
|
|
Use structured query syntax to filter entries from your knowledge based used by search results or chat responses.
|
|
|
|
|
|
|
|
- **Word Filter**: Get entries that include/exclude a specified term
|
|
|
|
- Entries that contain term_to_include: `+"term_to_include"`
|
|
|
|
- Entries that contain term_to_exclude: `-"term_to_exclude"`
|
|
|
|
- **Date Filter**: Get entries containing dates in YYYY-MM-DD format from specified date (range)
|
|
|
|
- Entries from April 1st 1984: `dt:"1984-04-01"`
|
|
|
|
- Entries after March 31st 1984: `dt>="1984-04-01"`
|
|
|
|
- Entries before April 2nd 1984 : `dt<="1984-04-01"`
|
|
|
|
- **File Filter**: Get entries from a specified file
|
|
|
|
- Entries from incoming.org file: `file:"incoming.org"`
|
|
|
|
- Combined Example
|
|
|
|
- `what is the meaning of life? file:"1984.org" dt>="1984-01-01" dt<="1985-01-01" -"big" -"brother"`
|
|
|
|
- Adds all filters to the natural language query. It should return entries
|
|
|
|
- from the file *1984.org*
|
|
|
|
- containing dates from the year *1984*
|
|
|
|
- excluding words *"big"* and *"brother"*
|
|
|
|
- that best match the natural language query *"what is the meaning of life?"*
|