add url to index

This commit is contained in:
_Bastler 2021-12-04 15:39:57 +01:00
parent 9486e7937d
commit 1c47e76e9f
2 changed files with 4 additions and 0 deletions

View File

@ -97,6 +97,8 @@ public class SearchManager implements SmartInitializingSingleton {
.boost(settingsManager.getGravity()))
.should(f.match().field("title_de").matching(search)
.boost(settingsManager.getGravity()))
.should(f.match().field("url").matching(search))
.should(f.match().field("url_de").matching(search))
.should(f.match().field("text").matching(search))
.should(f.match().field("text_de").matching(search)))
.sort(f -> sortByDate

View File

@ -66,6 +66,8 @@ public class Entry {
@Column(name = "flagged_status", nullable = false, columnDefinition = "varchar(255) default 'NORMAL'")
private FlaggedStatus flaggedStatus;
@Column(name = "url")
@FullTextField(name = "url", searchable = Searchable.YES, analyzer = "english", searchAnalyzer = "english_search")
@FullTextField(name = "url_de", searchable = Searchable.YES, analyzer = "german", searchAnalyzer = "german_search")
private String url;
@Column(name = "title", nullable = false)
@FullTextField(name = "title", searchable = Searchable.YES, analyzer = "english", searchAnalyzer = "english_search")