Documentation ¶
Index ¶
- func FilterByKeywords(rewritten *url.URL, files []ranking.ResultPath) []ranking.ResultPath
- type Server
- func (s *Server) File(ctx context.Context, in *sourcebackendpb.FileRequest) (*sourcebackendpb.FileReply, error)
- func (s *Server) ReplaceIndex(ctx context.Context, in *sourcebackendpb.ReplaceIndexRequest) (*sourcebackendpb.ReplaceIndexReply, error)
- func (s *Server) Search(in *sourcebackendpb.SearchRequest, ...) error
- type SourceReply
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterByKeywords ¶
func FilterByKeywords(rewritten *url.URL, files []ranking.ResultPath) []ranking.ResultPath
Types ¶
type Server ¶
type Server struct { // For forward compatibility sourcebackendpb.UnimplementedSourceBackendServer Index *index.Index UnpackedPath string IndexPath string UsePositionalIndex bool // contains filtered or unexported fields }
func (*Server) File ¶
func (s *Server) File(ctx context.Context, in *sourcebackendpb.FileRequest) (*sourcebackendpb.FileReply, error)
Serves a single file for displaying it in /show
func (*Server) ReplaceIndex ¶
func (s *Server) ReplaceIndex(ctx context.Context, in *sourcebackendpb.ReplaceIndexRequest) (*sourcebackendpb.ReplaceIndexReply, error)
func (*Server) Search ¶
func (s *Server) Search(in *sourcebackendpb.SearchRequest, stream sourcebackendpb.SourceBackend_SearchServer) error
Reads a single JSON request from the TCP connection, performs the search and sends results back over the TCP connection as they appear.
type SourceReply ¶
Click to show internal directories.
Click to hide internal directories.