mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Document using Word, Date and File Query Filter in Readme
This commit is contained in:
parent
06c25682c9
commit
a58c243bc0
1 changed files with 22 additions and 0 deletions
22
Readme.md
22
Readme.md
|
@ -18,6 +18,8 @@
|
|||
- [Configure](#2-Configure)
|
||||
- [Run](#3-Run)
|
||||
- [Use](#Use)
|
||||
- [Interfaces](#Interfaces-1)
|
||||
- [Query Filters](#Query-filters)
|
||||
- [Upgrade](#Upgrade)
|
||||
- [Troubleshoot](#Troubleshoot)
|
||||
- [Miscellaneous](#Miscellaneous)
|
||||
|
@ -88,6 +90,7 @@ khoj
|
|||
2. Click `Configure` and wait. The app will download ML models and index the content for search
|
||||
|
||||
## Use
|
||||
### Interfaces
|
||||
|
||||
- **Khoj via Web**
|
||||
- Open <http://localhost:8000/> via desktop interface or directly
|
||||
|
@ -97,6 +100,25 @@ khoj
|
|||
- **Khoj via API**
|
||||
- See the Khoj FastAPI [Swagger Docs](http://localhost:8000/docs), [ReDocs](http://localhost:8000/redocs)
|
||||
|
||||
### Query Filters
|
||||
Use structured query syntax to filter the natural language search results
|
||||
- **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?"*
|
||||
|
||||
## Upgrade
|
||||
|
||||
```shell
|
||||
|
|
Loading…
Reference in a new issue