Documentation
¶
Index ¶
- Constants
- type Document
- type FileEntry
- type Indexer
- func (i *Indexer) Close() error
- func (i *Indexer) Delete(path string) error
- func (i *Indexer) GetDocCount() (uint64, error)
- func (i *Indexer) Index(path string) error
- func (i *Indexer) ListFiles(prefix string, limit int) ([]FileEntry, int, error)
- func (i *Indexer) NeedsReindex() bool
- func (i *Indexer) ReindexAll() error
- func (i *Indexer) SaveSchemaVersion() error
- func (i *Indexer) Search(query string, limit int) (*bleve.SearchResult, error)
- func (i *Indexer) SearchAll(opts *SearchOptions) (*SearchResult, error)
- func (i *Indexer) SearchWithOptions(opts *SearchOptions) (*bleve.SearchResult, error)
- func (i *Indexer) Stats() *config.IndexStats
- func (i *Indexer) SyncIncremental() error
- type SearchOptions
- type SearchResult
Constants ¶
View Source
const SchemaVersion = 2
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct {
Path string `json:"path"`
Filename string `json:"filename"`
FilenameSub string `json:"filename_sub"`
FilenamePrefix string `json:"filename_prefix"`
Body string `json:"body"`
ContentType string `json:"content_type"`
ModTime time.Time `json:"mtime"`
Size int64 `json:"size"`
Hash string `json:"hash"`
ExifMake string `json:"exif_make,omitempty"`
ExifModel string `json:"exif_model,omitempty"`
ExifDateTime string `json:"exif_datetime,omitempty"`
ExifLatitude float64 `json:"exif_latitude,omitempty"`
ExifLongitude float64 `json:"exif_longitude,omitempty"`
ExifISO int `json:"exif_iso,omitempty"`
ExifFNumber float64 `json:"exif_fnumber,omitempty"`
ExifExposure string `json:"exif_exposure,omitempty"`
ExifFocalLen float64 `json:"exif_focal_length,omitempty"`
XattrTags []string `json:"xattr_tags,omitempty"`
DocType string `json:"doc_type"`
}
type Indexer ¶
type Indexer struct {
// contains filtered or unexported fields
}
func (*Indexer) GetDocCount ¶ added in v0.0.3
func (*Indexer) NeedsReindex ¶ added in v0.2.0
func (*Indexer) ReindexAll ¶
func (*Indexer) SaveSchemaVersion ¶ added in v0.2.0
func (*Indexer) SearchAll ¶ added in v0.2.0
func (i *Indexer) SearchAll(opts *SearchOptions) (*SearchResult, error)
func (*Indexer) SearchWithOptions ¶
func (i *Indexer) SearchWithOptions(opts *SearchOptions) (*bleve.SearchResult, error)
func (*Indexer) Stats ¶
func (i *Indexer) Stats() *config.IndexStats
func (*Indexer) SyncIncremental ¶
type SearchOptions ¶
type SearchOptions struct {
Query string `json:"query"`
Limit int `json:"limit"`
Field string `json:"field,omitempty"`
ContentType string `json:"content_type,omitempty"`
Extension string `json:"extension,omitempty"`
Fuzzy bool `json:"fuzzy,omitempty"`
SortBy string `json:"sort_by,omitempty"`
SortDesc bool `json:"sort_desc,omitempty"`
MinSize int64 `json:"min_size,omitempty"`
MaxSize int64 `json:"max_size,omitempty"`
ModifiedAfter string `json:"modified_after,omitempty"`
Facets []string `json:"facets,omitempty"`
Folder string `json:"folder,omitempty"`
ExifMake string `json:"exif_make,omitempty"`
ExifModel string `json:"exif_model,omitempty"`
ExifDateAfter string `json:"exif_date_after,omitempty"`
ExifDateBefore string `json:"exif_date_before,omitempty"`
ExifMinISO int `json:"exif_min_iso,omitempty"`
ExifMaxISO int `json:"exif_max_iso,omitempty"`
ExifMinAperture float64 `json:"exif_min_aperture,omitempty"`
ExifMaxAperture float64 `json:"exif_max_aperture,omitempty"`
ExifMinFocalLen float64 `json:"exif_min_focal_len,omitempty"`
ExifMaxFocalLen float64 `json:"exif_max_focal_len,omitempty"`
ExifLatMin float64 `json:"exif_lat_min,omitempty"`
ExifLatMax float64 `json:"exif_lat_max,omitempty"`
ExifLonMin float64 `json:"exif_lon_min,omitempty"`
ExifLonMax float64 `json:"exif_lon_max,omitempty"`
XattrTags string `json:"xattr_tags,omitempty"`
Type string `json:"type,omitempty"`
}
type SearchResult ¶ added in v0.2.0
type SearchResult struct {
*bleve.SearchResult
DirectoryHits search.DocumentMatchCollection `json:"directory_hits,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.