-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
goulven
authored and
goulven
committed
Dec 16, 2024
1 parent
5c4753e
commit 10dd7e1
Showing
4 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
commons/src/main/java/org/open4goods/commons/model/Text.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.open4goods.commons.model; | ||
|
||
import org.springframework.data.annotation.Id; | ||
import org.springframework.data.elasticsearch.annotations.Document; | ||
import org.springframework.data.elasticsearch.annotations.Field; | ||
import org.springframework.data.elasticsearch.annotations.FieldType; | ||
import org.springframework.data.elasticsearch.annotations.WriteTypeHint; | ||
|
||
@Document(indexName = "texts", createIndex = true, writeTypeHint = WriteTypeHint.FALSE) | ||
public class Text { | ||
|
||
@Id | ||
private String key; | ||
|
||
@Field(index = false, store = false, type = FieldType.Text) | ||
private String content; | ||
public String getKey() { | ||
return key; | ||
} | ||
public void setKey(String key) { | ||
this.key = key; | ||
} | ||
public String getContent() { | ||
return content; | ||
} | ||
public void setContent(String content) { | ||
this.content = content; | ||
} | ||
|
||
|
||
|
||
|
||
} |
17 changes: 17 additions & 0 deletions
17
.../src/main/java/org/open4goods/commons/store/repository/elastic/ElasticTextRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package org.open4goods.commons.store.repository.elastic; | ||
|
||
import org.open4goods.commons.model.Text; | ||
import org.open4goods.commons.model.product.Product; | ||
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; | ||
|
||
/** | ||
* | ||
* @author goulven | ||
* | ||
*/ | ||
|
||
public interface ElasticTextRepository extends ElasticsearchRepository<Text, String> { | ||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters