Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Snigdhashree Behera 3 posts 73 karma points
    Mar 24, 2022 @ 07:16
    Snigdhashree Behera
    0

    Hiii, i have an Umbraco 8.16.0 project where i have done the implemention On Search Enhancement for Course Title, Course Category and Keyword , But now i am implementing Search all these by the Search Engine Optimization Algorithm using ExamineManager that the searching text has to be in the highest priority by using OrderByDescending query. But the challenges i am facing that Examine.Search is not working while the CreateQuery() also not working as the code syntax not working as expectation while i am reffering the documents from forum with umbraco version 8.0.0 may be due to version mismatching or wrong implentation i dont know. Here i am sharing my code syntax please if wrong implementation i have done rectify it ;

    private ISearchResults QuerySearchIndex(string searchTerm) { if (!ExamineManager.Instance.TryGetIndex(AppConstants.UmbracoIndexes.CourseIndex, out var index)) { throw new InvalidOperationException($"No index found with name {AppConstants.UmbracoIndexes.CourseIndex}"); } var searcher = index.GetSearcher(); var query = searcher.CreateQuery("IndexTypes.Content"); var m = query.All().OrderByDescending(new Examine.Search.SortableField("searchTerm", Examine.Search.SortType.String)).Execute(); return m; }

    NOTE: I am Using Umbraco version 8.16.0

  • Snigdhashree Behera 3 posts 73 karma points
    Apr 20, 2022 @ 06:53
    Snigdhashree Behera
    0

    Search Enhancement Using Umbraco And Getting Started Umbraco 8 Hiii, i have an Umbraco 8.16.0 project where i have done the implemention On Search Enhancement for Course Title, Course Category and Keyword , But now i am implementing Search all these by the Search Engine Optimization Algorithm using ExamineManager that the searching text has to be in the highest priority by using OrderByDescending query. But the challenges i am facing that Examine.Search is not working while the CreateQuery() also not working as the code syntax not working as expectation while i am reffering the documents from forum with umbraco version 8.0.0 may be due to version mismatching or wrong implentation i dont know. Here i am sharing my code syntax please if wrong implementation i have done rectify it ;

    private ISearchResults QuerySearchIndex(string searchTerm) { if (!ExamineManager.Instance.TryGetIndex(AppConstants.UmbracoIndexes.CourseIndex, out var index)) { throw new InvalidOperationException($"No index found with name {AppConstants.UmbracoIndexes.CourseIndex}"); } var searcher = index.GetSearcher(); var query = searcher.CreateQuery("IndexTypes.Content"); var m = query.All().OrderByDescending(new Examine.Search.SortableField("searchTerm", Examine.Search.SortType.String)).Execute(); return m; }

    NOTE: I am Using Umbraco version 8.16.0

Please Sign in or register to post replies

Write your reply to:

Draft