Class SearchController

java.lang.Object
ai.chatur.cortex.spring.query.SearchController

@Controller public class SearchController extends Object
Web UI for searching the knowledge graph from the navbar search bar.
  • Constructor Details

    • SearchController

      public SearchController(ai.chatur.cortex.CortexSearch cortex)
      Creates the controller.
      Parameters:
      cortex - the search role used for full-text search
  • Method Details

    • search

      @GetMapping("/search") public String search(@RequestParam(value="q",required=false) String q, org.springframework.ui.Model model)
      Renders the results of a full-text search over subject labels, or an empty result set when q is absent or blank.
      Parameters:
      q - the search text, or null
      model - receives q (the search text, or "" when q was null) and results (the matching subjects, ranked by relevance)
      Returns:
      the search view name