(improvement)(chat) Perform a complete refactoring of the mapper and integrate the fuzzyNameMapper into the BaseMatchStrategy (#328)

This commit is contained in:
lexluo09
2023-11-06 17:43:46 +08:00
committed by GitHub
parent f5f9c0314a
commit e00b935c1f
12 changed files with 244 additions and 201 deletions

View File

@@ -0,0 +1,30 @@
package com.tencent.supersonic.knowledge.dictionary;
import com.google.common.base.Objects;
import com.tencent.supersonic.chat.api.pojo.SchemaElement;
import lombok.Data;
import lombok.ToString;
@Data
@ToString
public class FuzzyResult extends MapResult {
private SchemaElement schemaElement;
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FuzzyResult that = (FuzzyResult) o;
return Objects.equal(name, that.name) && Objects.equal(schemaElement, that.schemaElement);
}
@Override
public int hashCode() {
return Objects.hashCode(name, schemaElement);
}
}