/// <summary> /// Aggregation of filtered "categories" term. /// </summary> /// <returns></returns> public IActionResult Categories() { FLogger.LogInformation("Return aggregation of filtered terms"); return(View(FClient.Search <BookModel>(ASearch => ASearch .Query(AQuery => AQuery .MatchAll()) .Aggregations(AAggregate => AAggregate .Terms("categories", ATerms => ATerms .Field("categories.keyword")))))); }
void Start() { prevParam = 0.0f; manager = GetComponent <SteeringManagerComponent>(); Heuristic heuristic = new EuclideanHeuristic(); finder = new ASearch(heuristic.Heuristic); follower = new CoherentPathFollower(); manager[moveBehavior].SetEnabled(false); manager[moveBehavior].SetFloat("ArriveRadius", lookAhead * 0.75f); target = new PointActor(Vector3.zero); manager[moveBehavior].SetActor("Target", target); }
/// <summary> /// Aggregation of "pageCounts" field. /// </summary> /// <returns></returns> public IActionResult PageCount() { FLogger.LogInformation("Return page counts"); return(View(FClient.Search <BookModel>(ASearch => ASearch .Query(AQuery => AQuery .MatchAll()) .Aggregations(AAggregate => AAggregate .Range("pageCounts", ARange => ARange .Field(ABookModel => ABookModel.PageCount) .Ranges(ARanges => ARanges .From(0), ARanges => ARanges .From(200).To(400), ARanges => ARanges .From(400).To(600), ARanges => ARanges .From(600))))))); }
// Use this for initialization void Start() { //print ("Enter the file name: "); //string fileName = Console.ReadLine (); int[,] map = getData("Assets/inputFiles/txt1.txt"); //print (map [0,1] + " "); //Instantiate(Image); GameObject tile = new Square(); Instantiate(tile); var graph = new Graph(map); var Asearch = new ASearch(graph); Asearch.Start(graph.nodes [0], graph.nodes [2]); while (!Asearch.finished) { Asearch.Step(); } foreach (var node in Asearch.path) { print(node.Hcost + " | " + node.Gcost); } print("Search done. Path Length: " + Asearch.path.Count + " Iterations: " + Asearch.iterations); resetMapGroup(graph); foreach (var node in Asearch.path) { getImage(node.label).color = Color.red; } }
/// <summary> /// Return book that contains searched text in Title field; or first ten books. /// </summary> /// <param name="AInputQuery"></param> /// <returns></returns> public IActionResult TitleSearch(string AInputQuery) { if (!string.IsNullOrWhiteSpace(AInputQuery)) { var LShowResult = FClient .Search <BookModel>(ASearch => ASearch .Query(AQuery => AQuery .Match(AMatch => AMatch .Field(ABookModel => ABookModel.Title) .Query(AInputQuery)))); FLogger.LogInformation("{AInputQuery}", $"Searched phrase: {AInputQuery}"); return(View(LShowResult)); } FLogger.LogInformation("Display first ten results"); var LShowAll = FClient .Search <BookModel>(ASearch => ASearch .Query(AQuery => AQuery .MatchAll())); return(View(LShowAll)); }
public void Setup() { aSearch = new ASearch <TileNode>(); tests = new PathfinderTests(); }