Skip to content

Commit

Permalink
Enable search even if AI is not enabled (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
SmilyOrg authored Aug 19, 2024
2 parents 8d997b0 + 46d9266 commit 7a72b25
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ version zero.

### Added

- None
- Enable search even if AI is not enabled

### Changed

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ form of feedback to not lose track.
* **Different layouts**. Collections of photos can be displayed with different
layouts.
![layout examples](docs/assets/layouts.png)
* **Semantic search using [photofield-ai] (alpha)**. If enabled, you can search
* **Semantic search using [photofield-ai]**. If enabled, you can search
for photo contents using words like "beach sunset", "a couple kissing", or
"cat eyes". ![semantic search for "cat eyes"](docs/assets/semantic-search.jpg)
* **Tagging (alpha)**. You can tag and search photos with arbitrary tags. If
Expand Down
11 changes: 5 additions & 6 deletions docs/features/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ and efficiently. The search feature supports various types of queries, including
tag-based searches, semantic searches, and more.

::: tip
Search requires [photofield-ai] to be configured and enabled in the `ai`
section of the [configuration].
Features marked with <Badge type="tip" text="AI" /> require capabilities
provided by [photofield-ai]. You can configure it in the `ai` section of the
[configuration].
:::

## Semantic Search
## Semantic Search <Badge type="tip" text="AI" />

Semantic search allows you to search for photo contents using descriptive words
like "beach sunset", "a couple kissing", or "cat eyes".
Expand Down Expand Up @@ -65,15 +66,13 @@ parameter. The date range should be specified in the format
|-------|-------------|
| `created:2023-01-01..2023-12-31` | Find photos taken in the year 2023. |

## Deduplication
## Deduplication <Badge type="tip" text="AI" />

You can use the `dedup` parameter to filter out duplicate successive photos. The
value should be a threshold between 0 and 1 representing the similarity between
photos. For example, `dedup:0.9` will filter out photos that are 90% similar to
each other.

<!-- ### Example Query -->

| Query | Description |
|-------|-------------|
| `dedup:0.9` | Filter out photos that are 90% similar to each other. |
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ func (*Api) GetCapabilities(w http.ResponseWriter, r *http.Request) {
}
capabilities := openapi.Capabilities{}
if imageSource != nil {
capabilities.Search.Supported = imageSource.AI.Available()
capabilities.Search.Supported = true
}
capabilities.Tags.Supported = tagsEnabled
capabilities.Docs.Supported = docsurl != ""
Expand Down

0 comments on commit 7a72b25

Please sign in to comment.