Skip to content

Commit

Permalink
fix(searcher): skip artist if already indexed
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Apr 22, 2023
1 parent 1f66a01 commit 4b6dbd4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion storage/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "music-player-storage"
version = "0.1.7"
version = "0.1.8"
edition = "2021"
repository = "https://github.com/tsirysndr/music-player"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion storage/src/searcher/artist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl ArtistSearcher {
// Check if the artist already exists
let searcher = self.reader.searcher();
let query = TermQuery::new(
Term::from_field_text(name, artist.name.as_str()),
Term::from_field_text(id, &artist.id),
IndexRecordOption::Basic,
);
let top_docs = searcher.search(&query, &TopDocs::with_limit(1))?;
Expand Down

0 comments on commit 4b6dbd4

Please sign in to comment.