Hi,
I have a problem about Fuzzy Query scoring.
Here is my entity.
Code:
@Indexed
public class PersonInfo {
...
...
...
@Field
@Boost(2.0f)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Field
@Boost(2.0f)
public String getLastnameTitle() {
return lastnameTitle;
}
public void setLastnameTitle(String lastnameTitle) {
this.lastnameTitle = lastnameTitle;
}
@Field
@Boost(1.0f)
public String getFatherName() {
return fatherName;
}
public void setFatherName(String fatherName) {
this.fatherName = fatherName;
}
@Field
@Boost(1.0f)
public String getMotherName() {
return motherName;
}
public void setMotherName(String motherName) {
this.motherName = motherName;
}
@Field
@Boost(0.5f)
public String getBirthPlace() {
return birthPlace;
}
public void setBirthPlace(String birthPlace) {
this.birthPlace = birthPlace;
}
@Field
@Boost(0.5f)
@DateBridge(resolution = Resolution.DAY)
public Date getBirthDate() {
return birthDate;
}
public void setBirthDate(Date birthDate) {
this.birthDate = birthDate;
}
}
When I search for "John" as name that is exactly matched to indexed entity named "John", I get score as "0.61".
I expeced that score must be "1.00" because they are exactly same.
When I debug search code, in "FuzzyTermEnum" similarity is calculated as "1.00" that is what I expected. But score is calculated as "0.61".
Why score is calculated as "0.61".
Any suggestions?
or
How can I override scoring behaviour?