File tree 6 files changed +30
-8
lines changed
6 files changed +30
-8
lines changed Original file line number Diff line number Diff line change 9
9
- 阿里云表格存储是构建在阿里云飞天分布式系统之上的NoSQL数据存储服务,提供海量结构化数据的存储和实时访问。
10
10
11
11
## 版本
12
- - 当前版本:6.0.0
12
+ - 当前版本:6.0.2
13
13
14
14
## 运行环境
15
15
### Windows
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ public class SearchIndexSample
28
28
private static readonly string Date_type_col = "Data_type_col" ;
29
29
private static readonly string Geo_type_col = "Geo_type_col" ;
30
30
private static readonly string Virtual_col_Text = "Virtual_col_Text" ;
31
+ private static readonly string Nested_type_col = "Nested_type_col" ;
31
32
32
33
static void Main ( string [ ] args )
33
34
{
@@ -93,7 +94,7 @@ static void Main(string[] args)
93
94
DeleteTable ( otsClient ) ;
94
95
95
96
Console . WriteLine ( "SearchIndexSample Finish!" ) ;
96
- Console . ReadLine ( ) ;
97
+ Console . ReadKey ( ) ;
97
98
}
98
99
99
100
public static void CreateTable ( OTSClient otsClient )
@@ -190,6 +191,19 @@ public static void CreateSearchIndex(OTSClient otsClient)
190
191
Delimiter = " "
191
192
}
192
193
} ,
194
+ // 构建嵌套列
195
+ new FieldSchema ( Nested_type_col , FieldType . NESTED ) {
196
+ SubFieldSchemas = new List < FieldSchema > {
197
+ new FieldSchema ( "LastName" , FieldType . TEXT ) {
198
+ index = true ,
199
+ Store = true
200
+ } ,
201
+ new FieldSchema ( "FirtName" , FieldType . TEXT ) {
202
+ index = true ,
203
+ Store = true
204
+ }
205
+ }
206
+ } ,
193
207
// 构建日期列
194
208
new FieldSchema ( Date_type_col , FieldType . DATE ) {
195
209
index = true ,
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public class FieldSchema
30
30
/// <summary>
31
31
/// 倒排索引的配置选项
32
32
/// </summary>
33
- public IndexOptions IndexOptions { get ; set ; }
33
+ public IndexOptions ? IndexOptions { get ; set ; }
34
34
/// <summary>
35
35
/// 分词器设置
36
36
/// </summary>
Original file line number Diff line number Diff line change @@ -615,11 +615,16 @@ private DataModel.Search.FieldSchema ParseFieldSchema(PB.FieldSchema fieldSchema
615
615
{
616
616
ret . Analyzer = ParseAnalyzer ( fieldSchema . Analyzer ) ;
617
617
}
618
+
618
619
ret . EnableSortAndAgg = fieldSchema . DocValues ;
619
620
ret . index = fieldSchema . Index ;
620
621
ret . Store = fieldSchema . Store ;
621
622
ret . IsArray = fieldSchema . IsArray ;
622
- ret . IndexOptions = ParseIndexOption ( fieldSchema . IndexOptions ) ;
623
+
624
+ if ( fieldSchema . FieldType != PB . FieldType . NESTED )
625
+ {
626
+ ret . IndexOptions = ParseIndexOption ( fieldSchema . IndexOptions ) ;
627
+ }
623
628
624
629
if ( fieldSchema . HasAnalyzerParameter && fieldSchema . HasAnalyzer )
625
630
{
Original file line number Diff line number Diff line change @@ -579,7 +579,10 @@ private PB.FieldSchema EncodingFieldSchema(DataModel.Search.FieldSchema fieldSch
579
579
builder . IsArray = fieldSchema . IsArray ;
580
580
}
581
581
582
- builder . IndexOptions = EncodingIndexOptions ( fieldSchema . IndexOptions ) ;
582
+ if ( fieldSchema . IndexOptions . HasValue )
583
+ {
584
+ builder . IndexOptions = EncodingIndexOptions ( fieldSchema . IndexOptions . Value ) ;
585
+ }
583
586
584
587
if ( fieldSchema . Analyzer . HasValue )
585
588
{
Original file line number Diff line number Diff line change 5
5
<PackageId >Aliyun.TableStore.SDK</PackageId >
6
6
<AssemblyName >Aliyun.TableStore.SDK</AssemblyName >
7
7
<authors >aliyun</authors >
8
- <Version >6.0.1 </Version >
8
+ <Version >6.0.2 </Version >
9
9
<Description >Aliyun Table Store SDK for .NetCore and .NETFrameWork</Description >
10
10
<Copyright >Copyright (c) 2009-2022 aliyun.com</Copyright >
11
- <ReleaseNotes >Support NetStandard2.0; Compatible NetFrameWork4.0. </ReleaseNotes >
11
+ <ReleaseNotes >fix bug cause by nested fieldtype when create search index </ReleaseNotes >
12
12
<PackageProjectUrl >https://github.com/aliyun/aliyun-tablestore-csharp-sdk</PackageProjectUrl >
13
13
<PackageLicenseExpression >Apache-2.0</PackageLicenseExpression >
14
14
<GenerateAssemblyInfo >false</GenerateAssemblyInfo >
34
34
<Version >2.0.20710</Version >
35
35
</PackageReference >
36
36
</ItemGroup >
37
- </Project >
37
+ </Project >
You can’t perform that action at this time.
0 commit comments