{{define "partial_search_results.html"}}

{{if .Results.Results}}{{.Results.Total}} result{{if ne .Results.Total 1}}s{{end}}{{else}}No results{{end}} ({{.Results.TookMS}} ms)

{{range .Results.Notes}}

{{.}}

{{end}} {{if .Results.Results}}

Query relevance is how well an item answers this query. Similarity is how close its wording is to yours. Relationship strength is how well evidenced a link between two items is. These are three different measurements; none of them is a probability.

    {{range .Results.Results}}
  1. {{.Item.Title}}

    Query relevance {{score2 .QueryRelevance}} {{if .SemanticSimilarity}} Similarity {{score2 .SemanticSimilarity}} {{end}} {{statusLabel .Item.Status}} {{.Item.SourceType}} · {{date .Item.CreatedAt}}

    {{if .ViaRelationship}}

    Not a direct match. Reached because this item is {{relTypeLabel .ViaRelationship.Type}} a matching item — strength {{score2 .ViaRelationship.Strength}} ({{provenanceLabel .ViaRelationship.Provenance}}).

    {{end}}

    {{.Excerpt}}

    Why this matched
      {{range .WhyMatched}}
    • {{.}}
    • {{end}}
    {{if .MatchedEntities}}

    Matching entities: {{range .MatchedEntities}}{{.Name}}{{end}}

    {{end}} {{if .MatchedChunks}}

    Matching sections

      {{range .MatchedChunks}}
    • Section {{add .Sequence 1}}{{if .Page}}, page {{.Page}}{{end}}{{if .Section}} — {{.Section}}{{end}} {{if .Similarity}}(similarity {{score2 .Similarity}}){{end}}
      {{truncate 400 .Text}}
    • {{end}}
    {{end}} {{if .Related}} {{end}}
  2. {{end}}
{{if .Pagination.HasMore}} {{end}} {{else}}

Nothing matched

No stored item matched “{{.Query.Text}}”.

{{end}}
{{end}}