This commit is contained in:
2018-09-19 17:47:34 +00:00
parent c1352c5cc4
commit 250a4f9ecf
2 changed files with 28 additions and 5 deletions

View File

@@ -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

View File

@@ -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<string> StopWords { get; set; }
public SearchResult()
{
CJKIndex = false;
StopWords = new List<string>();
}
}
public static async Task<List<SearchResult>> DoSearch(AyContext ct, long localeId, long objectID, AyaType objectType, string name, params string[] text)
{
List<SearchResult> ResultList=new List<SearchResult>();
//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)