Skip to content

Commit 22f4f09

Browse files
committed
tici: add stop_words to CreateIndex parser info
1 parent 1852f98 commit 22f4f09

File tree

4 files changed

+138
-69
lines changed

4 files changed

+138
-69
lines changed

go-tipb/tici.pb.go

Lines changed: 125 additions & 67 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/tici/indexer.proto

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ message ParserInfo {
143143
ParserType parser_type = 1;
144144
// Parser parameters
145145
map<string, string> parser_params = 2;
146+
// Stop words list. Only used when stopwords are enabled at index creation time.
147+
repeated string stop_words = 3;
146148
}
147149

148150
// GetIndexProgressRequest is a request to get the progress of an index build
@@ -169,4 +171,4 @@ message GetIndexProgressResponse {
169171
string last_upload_time = 6;
170172
// S3 path where the index is stored
171173
repeated string s3_path = 7;
172-
}
174+
}

scripts/generate-go.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@ protoc -I.:../include --gofast_out=plugins=grpc:../go-tipb *.proto
1313
protoc -I.:../include --gofast_out=plugins=grpc,Mtici/indexer.proto=github.com/pingcap/tipb/go-tipb,import_path=tipb:../go-tipb tici/*.proto
1414

1515
cd ../go-tipb
16+
if [ -f "tici/indexer.pb.go" ]; then
17+
mv tici/indexer.pb.go tici.pb.go
18+
fi
1619
sed -i.bak -E 's/import _ \"gogoproto\"//g' *.pb.go
1720
sed -i.bak -E 's/context \"context\"//g' *.pb.go
1821
sed -i.bak -E 's/fmt \"fmt\"//g' *.pb.go
1922
sed -i.bak -E 's/io \"io\"//g' *.pb.go
2023
sed -i.bak -E 's/math \"math\"//g' *.pb.go
2124
sed -i.bak -E 's/_ \".*rustproto\"//g' *.pb.go
22-
sed -i.bak -E 's/import _ \"\.\"//' *.pb.go
25+
sed -i.bak -E '/^[[:space:]]*_ \"\.\"[[:space:]]*$/d' *.pb.go
2326
sed -i.bak -E 's/package tipb_tici/package tipb/' *.pb.go
2427

2528
# Remove temporary files

scripts/proto.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8245,6 +8245,12 @@
82458245
"id": 1,
82468246
"name": "parser_type",
82478247
"type": "ParserType"
8248+
},
8249+
{
8250+
"id": 3,
8251+
"name": "stop_words",
8252+
"type": "string",
8253+
"is_repeated": true
82488254
}
82498255
],
82508256
"maps": [

0 commit comments

Comments
 (0)