private string ConvertKqlToFql()
        {
            Dictionary <string, string> scopeLookup = GetScopeLookup(_cacheKey);
            Dictionary <string, string> managedPropertyTypeLookup = GetPropertyTypeLookup(_cacheKey);

            string scopeFilter = null;

            if (!string.IsNullOrEmpty(this.Scope))
            {
                scopeLookup.TryGetValue(this.Scope.ToLower(), out scopeFilter);
            }

            FqlHelper helper = new FqlHelper(_synonymLookup, managedPropertyTypeLookup, scopeFilter);
            var       fql    = helper.GetFqlFromKql(_query, SynonymHandling, BoostValue);

            return(fql);
        }
Beispiel #2
0
        private string ConvertKqlToFql()
        {
            Logger.Instance.Info("Converting Kql to Fql", DiagnosticsCategories.eCaseSearch);
            Dictionary <string, string> scopeLookup = GetScopeLookup(_cacheKey);
            Dictionary <string, string> managedPropertyTypeLookup = GetPropertyTypeLookup(_cacheKey);

            string scopeFilter = null;

            if (!string.IsNullOrEmpty(this.Scope))
            {
                scopeLookup.TryGetValue(this.Scope.ToLower(), out scopeFilter);
            }
            Logger.Instance.Info(String.Format("Requested Scope: {0} ; Scope Filter: {1}",
                                               this.Scope,
                                               String.IsNullOrEmpty(scopeFilter) ? "Not Found" : scopeFilter),
                                 DiagnosticsCategories.eCaseSearch);

            FqlHelper helper = new FqlHelper(_synonymLookup, managedPropertyTypeLookup, scopeFilter);
            var       fql    = helper.GetFqlFromKql(_query, SynonymHandling, BoostValue);

            Logger.Instance.Info(String.Format("Converting Kql to Fql Completed - Resulting FQL: {0}", fql), DiagnosticsCategories.eCaseSearch);

            return(fql);
        }
Beispiel #3
0
 public void PropertyWord()
 {
     string query  = @"author:mikael";
     string result = _helper.GetFqlFromKql(query);
 }