Package ai.chatur.cortex.spring.query
Class SearchController
java.lang.Object
ai.chatur.cortex.spring.query.SearchController
Web UI for searching the knowledge graph from the navbar search bar.
-
Constructor Summary
ConstructorsConstructorDescriptionSearchController(ai.chatur.cortex.CortexSearch cortex) Creates the controller. -
Method Summary
-
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 whenqis absent or blank.- Parameters:
q- the search text, ornullmodel- receivesq(the search text, or""whenqwasnull) andresults(the matching subjects, ranked by relevance)- Returns:
- the
searchview name
-