qri: github.com/qri-io/qri/repo/search Index | Files

package search

import "github.com/qri-io/qri/repo/search"

Package search creates a local search index of a repo using the bleve search engine


Package Files

bleve.go index.go search.go

func IndexRepo Uses

func IndexRepo(ctx context.Context, r repo.Repo, i bleve.Index) error

IndexRepo calculates an index for a given repository

func Search(i Index, p repo.SearchParams) ([]repo.DatasetRef, error)

Search searches this repo's bleve index

type Index Uses

type Index bleve.Index

Index is an index of search data

func LoadIndex Uses

func LoadIndex(indexPath string) (Index, error)

LoadIndex loads the search index

type IndexableMetadata Uses

type IndexableMetadata struct {
    Category      string `json:"category"`
    Title         string `json:"title"`
    Description   string `json:"description"`
    Kind          string `json:"kind"`
    ExternalScore int    `json:"externalScore"`
    // contains filtered or unexported fields

IndexableMetadata specifies the subset of fields we want to keep from a dataset's metadata file to be used in the bleveindex ExternalScore and internalScore are placeholders for future use.

func NewIndexableMetadataStruct Uses

func NewIndexableMetadataStruct() *IndexableMetadata

NewIndexableMetadataStruct sets the default variable used to identify document type to 'table'

func (*IndexableMetadata) MapValues Uses

func (imd *IndexableMetadata) MapValues() map[string]interface{}

MapValues converts the IndexableMetadata back to type map[string]interface{}

Package search imports 10 packages (graph) and is imported by 1 packages. Updated 2019-09-16. Refresh now. Tools for package owners.