-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
111 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
algoliasearch-core/src/main/java/com/algolia/search/models/indexing/RecommendHit.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.algolia.search.models.indexing; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import javax.annotation.Nonnull; | ||
|
||
/** Recommend hit, similar to a search hit but associated with a score. */ | ||
public interface RecommendHit { | ||
|
||
/** Confidence score of the recommended item, the closer it’s to 100, the more relevant. */ | ||
@Nonnull | ||
@JsonProperty("_score") | ||
Float getScore(); | ||
} |
15 changes: 2 additions & 13 deletions
15
...iasearch-core/src/main/java/com/algolia/search/models/indexing/RecommendationsResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,4 @@ | ||
package com.algolia.search.models.indexing; | ||
|
||
public class RecommendationsResult<T> extends SearchResult<T> { | ||
|
||
private Integer score; | ||
|
||
public Integer getScore() { | ||
return score; | ||
} | ||
|
||
public RecommendationsResult<T> setScore(Integer score) { | ||
this.score = score; | ||
return this; | ||
} | ||
} | ||
/** Result of a recommendation request. */ | ||
public class RecommendationsResult<T extends RecommendHit> extends SearchResult<T> {} |
5 changes: 4 additions & 1 deletion
5
...ch-core/src/main/java/com/algolia/search/models/recommend/GetRecommendationsResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.