Skip to content

Commit 30279d1

Browse files
authored
Merge pull request #103 from Leets-Official/refactor/#102
refactor: ๊ฒ€์ƒ‰ ๊ธฐ๋Šฅ '-'์ด ์กด์žฌํ•ด๋„ ๊ฒ€์ƒ‰์ด ๊ฐ€๋Šฅํ•˜๋„๋ก ๊ตฌํ˜„
2 parents 0ccd0f1 + 611a6a1 commit 30279d1

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

โ€Žsrc/main/java/com/leets/commitatobe/domain/user/domain/UserDocument.javaโ€Ž

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,31 @@
22

33
import org.springframework.data.annotation.Id;
44
import org.springframework.data.elasticsearch.annotations.Document;
5+
import org.springframework.data.elasticsearch.annotations.Field;
6+
import org.springframework.data.elasticsearch.annotations.FieldType;
7+
import org.springframework.data.elasticsearch.annotations.Setting;
58

69
import lombok.AllArgsConstructor;
710
import lombok.Data;
811
import lombok.NoArgsConstructor;
912

1013
@Document(indexName = "users")
14+
@Setting(settingPath = "elasticsearch/settings.json")
1115
@Data
1216
@NoArgsConstructor
1317
@AllArgsConstructor
1418
public class UserDocument {
1519
@Id
1620
private String id;
21+
22+
@Field(type = FieldType.Text, analyzer = "hyphen_preserving")
1723
private String githubId;
24+
1825
private String tierName;
26+
1927
private Integer ranking;
28+
2029
private Integer exp;
30+
2131
private Integer consecutiveCommitDays;
2232
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"analysis": {
3+
"analyzer": {
4+
"hyphen_preserving": {
5+
"tokenizer": "whitespace",
6+
"filter": ["lowercase"]
7+
}
8+
}
9+
}
10+
}

0 commit comments

Comments
ย (0)