diff --git a/devdocs/todo.txt b/devdocs/todo.txt index aa0fbb47..ca449a2b 100644 --- a/devdocs/todo.txt +++ b/devdocs/todo.txt @@ -29,8 +29,7 @@ IMMEDIATE ITEMS: ================ - - Search and search text indexing - - Finish coding processkeywords in Search.cs + - Search and search text indexing - Add tests using widget which now sports a Notes property - Add code to do actual search and return results and routes (tags need support too as per search specs) - Add tests for searching and routes diff --git a/server/AyaNova/biz/Search.cs b/server/AyaNova/biz/Search.cs index 8b6d2e02..f5789076 100644 --- a/server/AyaNova/biz/Search.cs +++ b/server/AyaNova/biz/Search.cs @@ -4,6 +4,7 @@ using System.Globalization; using System.Text; using System.Collections.Generic; using System.IO; +using System.Threading.Tasks; using Newtonsoft.Json.Linq; using Microsoft.Extensions.Logging; using Microsoft.EntityFrameworkCore; @@ -20,13 +21,36 @@ namespace AyaNova.Biz /* ISSUES: - I'm seeing stopwords in the database searchdictionary "the" that shouldn't be there in the first place - - Due to locale being german for manager test account creating crud widget - FIXED?: ObjectID and type are empty in searchkeys + none at the moment */ + + #region Search and return results + //Class to hold search result + public class SearchResult + { + public bool CJKIndex { get; set; } + public List StopWords { get; set; } + public SearchResult() + { + CJKIndex = false; + StopWords = new List(); + } + } + + public static async Task> DoSearch(AyContext ct, long localeId, long objectID, AyaType objectType, string name, params string[] text) + { + List ResultList=new List(); + +//fake await to clear error +await ct.SaveChangesAsync(); + + return ResultList; + } + #endregion + #region ProcessKeywords into Database public static void ProcessNewObjectKeywords(AyContext ct, long localeId, long objectID, AyaType objectType, string name, params string[] text)