mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-13 04:57:28 +00:00
[improvement][chat] In the search interface, modelId and modelName are changed to dataSetId and dataSetName (#1855)
This commit is contained in:
@@ -18,9 +18,9 @@ public class SearchResult {
|
|||||||
|
|
||||||
private String subRecommend;
|
private String subRecommend;
|
||||||
|
|
||||||
private String modelName;
|
private Long dataSetId;
|
||||||
|
|
||||||
private Long modelId;
|
private String dataSetName;
|
||||||
|
|
||||||
private SchemaElementType schemaElementType;
|
private SchemaElementType schemaElementType;
|
||||||
|
|
||||||
@@ -36,11 +36,11 @@ public class SearchResult {
|
|||||||
}
|
}
|
||||||
SearchResult searchResult1 = (SearchResult) o;
|
SearchResult searchResult1 = (SearchResult) o;
|
||||||
return Objects.equals(recommend, searchResult1.recommend)
|
return Objects.equals(recommend, searchResult1.recommend)
|
||||||
&& Objects.equals(modelName, searchResult1.modelName);
|
&& Objects.equals(dataSetName, searchResult1.dataSetName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(recommend, modelName);
|
return Objects.hash(recommend, dataSetName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,7 +181,8 @@ public class RetrieveServiceImpl implements RetrieveService {
|
|||||||
|
|
||||||
private SearchResult createBaseSearchResult(Long dataSetId, Map<Long, String> dataSetIdToName,
|
private SearchResult createBaseSearchResult(Long dataSetId, Map<Long, String> dataSetIdToName,
|
||||||
MatchText matchText, String wordName, SchemaElementType schemaElementType) {
|
MatchText matchText, String wordName, SchemaElementType schemaElementType) {
|
||||||
return SearchResult.builder().modelId(dataSetId).modelName(dataSetIdToName.get(dataSetId))
|
return SearchResult.builder().dataSetId(dataSetId)
|
||||||
|
.dataSetName(dataSetIdToName.get(dataSetId))
|
||||||
.recommend(matchText.getRegText() + wordName).schemaElementType(schemaElementType)
|
.recommend(matchText.getRegText() + wordName).schemaElementType(schemaElementType)
|
||||||
.subRecommend(wordName).build();
|
.subRecommend(wordName).build();
|
||||||
}
|
}
|
||||||
@@ -206,7 +207,7 @@ public class RetrieveServiceImpl implements RetrieveService {
|
|||||||
|
|
||||||
private SearchResult createMetricSearchResult(Long modelId, Map<Long, String> modelToName,
|
private SearchResult createMetricSearchResult(Long modelId, Map<Long, String> modelToName,
|
||||||
MatchText matchText, String wordName, String metric) {
|
MatchText matchText, String wordName, String metric) {
|
||||||
return SearchResult.builder().modelId(modelId).modelName(modelToName.get(modelId))
|
return SearchResult.builder().dataSetId(modelId).dataSetName(modelToName.get(modelId))
|
||||||
.recommend(matchText.getRegText() + wordName + DictWordType.SPACE + metric)
|
.recommend(matchText.getRegText() + wordName + DictWordType.SPACE + metric)
|
||||||
.subRecommend(wordName + DictWordType.SPACE + metric).isComplete(false).build();
|
.subRecommend(wordName + DictWordType.SPACE + metric).isComplete(false).build();
|
||||||
}
|
}
|
||||||
@@ -281,7 +282,7 @@ public class RetrieveServiceImpl implements RetrieveService {
|
|||||||
String subRecommendText = hanlpMapResult.getName();
|
String subRecommendText = hanlpMapResult.getName();
|
||||||
|
|
||||||
SearchResult searchResult =
|
SearchResult searchResult =
|
||||||
SearchResult.builder().modelId(dataSetId).modelName(modelName)
|
SearchResult.builder().dataSetId(dataSetId).dataSetName(modelName)
|
||||||
.recommend(recommendText).subRecommend(subRecommendText)
|
.recommend(recommendText).subRecommend(subRecommendText)
|
||||||
.schemaElementType(schemaElementType).build();
|
.schemaElementType(schemaElementType).build();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user