Skip to content

Commit ceeddb4

Browse files
committed
Cleanup some things missed during rename
1 parent ed5bb78 commit ceeddb4

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

x-pack/plugin/logsdb/src/main/java/org/elasticsearch/xpack/logsdb/patternedtext/Arg.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ public static Type fromCode(int code) {
5353
}
5454
}
5555

56-
record Info(Type type, int offsetInfoTemplate) {
56+
record Info(Type type, int offsetInTemplate) {
5757
public Info {
58-
assert offsetInfoTemplate >= 0;
58+
assert offsetInTemplate >= 0;
5959
}
6060

6161
void writeTo(ByteArrayDataOutput out, int previousOffset) throws IOException {
6262
out.writeVInt(type.toCode());
63-
int diff = offsetInfoTemplate - previousOffset;
63+
int diff = offsetInTemplate - previousOffset;
6464
out.writeVInt(diff);
6565
}
6666

@@ -89,7 +89,7 @@ static String encodeInfo(List<Info> arguments) throws IOException {
8989
int previousOffset = 0;
9090
for (var arg : arguments) {
9191
arg.writeTo(dataInput, previousOffset);
92-
previousOffset = arg.offsetInfoTemplate;
92+
previousOffset = arg.offsetInTemplate;
9393
}
9494

9595
int size = dataInput.getPosition();
@@ -107,7 +107,7 @@ static List<Info> decodeInfo(String encoded) throws IOException {
107107
for (int i = 0; i < numArgs; i++) {
108108
var argInfo = Info.readFrom(input, previousOffset);
109109
arguments.add(argInfo);
110-
previousOffset = argInfo.offsetInfoTemplate;
110+
previousOffset = argInfo.offsetInTemplate;
111111
}
112112
return arguments;
113113
}

x-pack/plugin/logsdb/src/main/java/org/elasticsearch/xpack/logsdb/patternedtext/PatternedTextFieldType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class PatternedTextFieldType extends StringFieldType {
5757
private static final String TEMPLATE_SUFFIX = ".template";
5858
private static final String TEMPLATE_ID_SUFFIX = ".template_id";
5959
private static final String ARGS_SUFFIX = ".args";
60-
private static final String ARGS_Info_SUFFIX = ".args_Info";
60+
private static final String ARGS_INFO_SUFFIX = ".args_info";
6161

6262
public static final String CONTENT_TYPE = "patterned_text";
6363

@@ -274,7 +274,7 @@ String argsFieldName() {
274274
}
275275

276276
String argsInfoFieldName() {
277-
return name() + ARGS_Info_SUFFIX;
277+
return name() + ARGS_INFO_SUFFIX;
278278
}
279279

280280
}

x-pack/plugin/logsdb/src/main/java/org/elasticsearch/xpack/logsdb/patternedtext/PatternedTextValueProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ static String merge(String template, String[] args, List<Arg.Info> argsInfo) {
8787
String arg = args[i];
8888
var argInfo = argsInfo.get(i);
8989

90-
builder.append(template, nextToWrite, argInfo.offsetInfoTemplate());
90+
builder.append(template, nextToWrite, argInfo.offsetInTemplate());
9191
builder.append(arg);
92-
nextToWrite = argInfo.offsetInfoTemplate();
92+
nextToWrite = argInfo.offsetInTemplate();
9393
}
9494

9595
if (nextToWrite < template.length()) {

x-pack/plugin/logsdb/src/yamlRestTest/resources/rest-api-spec/test/patternedtext/30_template_id.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ Get template_id field:
8383
- match: { hits.total.value: 1 }
8484
- match: { hits.hits.0.fields: {"foo.template_id": ["mOVsnxlxdac"]} }
8585

86-
87-
# 2, 5 "iJEgF75EQNk" > mOVsnxlxdac
88-
# 3 vSr1YMYPups => 1l_PtCLQ5xY
89-
# 4 k-2qtjujOCw
9086
---
9187
Sort by template_id descending from index config setting:
9288
- do:

0 commit comments

Comments
 (0)