Documentation
¶
Index ¶
- func SetupRouter(indexRepository repository.IndexRepo) *gin.Engine
- type DocumentDTO
- type DocumentScoreDTO
- type DocumentUpdateDTO
- type IndexCtrl
- func (ic IndexCtrl) Analyze(c *gin.Context)
- func (ic IndexCtrl) CreateDocument(c *gin.Context)
- func (ic IndexCtrl) CreateIndex(c *gin.Context)
- func (ic IndexCtrl) DeleteDocument(c *gin.Context)
- func (ic IndexCtrl) DeleteIndex(c *gin.Context)
- func (ic IndexCtrl) GetDocument(c *gin.Context)
- func (ic IndexCtrl) GetIndex(c *gin.Context)
- func (ic IndexCtrl) GetIndexes(c *gin.Context)
- func (ic IndexCtrl) SearchDocuments(c *gin.Context)
- func (ic IndexCtrl) Suggestions(c *gin.Context)
- func (ic IndexCtrl) TopTerms(c *gin.Context)
- func (ic IndexCtrl) UpdateDocument(c *gin.Context)
- type IndexInputDTO
- type IndexOutputDTO
- type SearchInputDTO
- type SearchOutputDTO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupRouter ¶
func SetupRouter(indexRepository repository.IndexRepo) *gin.Engine
Types ¶
type DocumentDTO ¶
type DocumentScoreDTO ¶
type DocumentUpdateDTO ¶
type DocumentUpdateDTO struct {
Text string `json:"text" binding:"required"`
}
type IndexCtrl ¶
type IndexCtrl struct {
IndexRepository repository.IndexRepo
}
func (IndexCtrl) CreateDocument ¶
func (IndexCtrl) CreateIndex ¶
func (IndexCtrl) DeleteDocument ¶
func (IndexCtrl) DeleteIndex ¶
func (IndexCtrl) GetDocument ¶
func (IndexCtrl) GetIndexes ¶
func (IndexCtrl) SearchDocuments ¶
func (IndexCtrl) Suggestions ¶
func (IndexCtrl) UpdateDocument ¶
type IndexInputDTO ¶
type IndexInputDTO struct {
ID string `json:"id" binding:"required"`
Analyzer string `json:"analyzer" binding:"required"`
Stopwords []string `json:"stopwords,omitempty"`
Synonyms map[string]string `json:"synonyms,omitempty"`
Stemmer string `json:"stemmer,omitempty"`
Fuzziness *struct {
MinTermCount int `json:"min_term_count,omitempty"`
MaxEditDistance int `json:"max_edit_distance,omitempty"`
} `json:"fuzziness,omitempty"`
}
type IndexOutputDTO ¶
type SearchInputDTO ¶
type SearchOutputDTO ¶
type SearchOutputDTO struct {
Docs []DocumentScoreDTO `json:"docs"`
Size int `json:"size"`
}
Click to show internal directories.
Click to hide internal directories.