mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-26 14:54:56 +00:00
Adressing review comments
This commit is contained in:
parent
d38a1b4d61
commit
694dd0c6c5
@ -710,7 +710,7 @@ public abstract class StreamInput extends InputStream {
|
||||
/**
|
||||
* Reads a {@link SmoothingModel} from the current stream
|
||||
*/
|
||||
public SmoothingModel readSmoothingModel() throws IOException {
|
||||
public SmoothingModel readPhraseSuggestionSmoothingModel() throws IOException {
|
||||
return readNamedWriteable(SmoothingModel.class);
|
||||
}
|
||||
|
||||
|
@ -674,7 +674,7 @@ public abstract class StreamOutput extends OutputStream {
|
||||
/**
|
||||
* Writes the given {@link SmoothingModel} to the stream
|
||||
*/
|
||||
public void writeSmoothingModel(SmoothingModel smoothinModel) throws IOException {
|
||||
public void writePhraseSuggestionSmoothingModel(SmoothingModel smoothinModel) throws IOException {
|
||||
writeNamedWriteable(smoothinModel);
|
||||
}
|
||||
|
||||
|
@ -754,7 +754,7 @@ public final class PhraseSuggestionBuilder extends SuggestionBuilder<PhraseSugge
|
||||
boolean hasModel = model != null;
|
||||
out.writeBoolean(hasModel);
|
||||
if (hasModel) {
|
||||
out.writeSmoothingModel(model);
|
||||
out.writePhraseSuggestionSmoothingModel(model);
|
||||
}
|
||||
out.writeOptionalBoolean(forceUnigrams);
|
||||
out.writeOptionalVInt(tokenLimit);
|
||||
@ -788,7 +788,7 @@ public final class PhraseSuggestionBuilder extends SuggestionBuilder<PhraseSugge
|
||||
builder.confidence = in.readOptionalFloat();
|
||||
builder.gramSize = in.readOptionalVInt();
|
||||
if (in.readBoolean()) {
|
||||
builder.model = in.readSmoothingModel();
|
||||
builder.model = in.readPhraseSuggestionSmoothingModel();
|
||||
}
|
||||
builder.forceUnigrams = in.readOptionalBoolean();
|
||||
builder.tokenLimit = in.readOptionalVInt();
|
||||
|
Loading…
x
Reference in New Issue
Block a user