private static AttributeFilterValue ConvertToAttributeFilterValue(PropertyDictionaryValue dictionaryValue) { var result = new AttributeFilterValue { Id = dictionaryValue.Alias, Value = dictionaryValue.Value, }; return result; }
/// <summary> /// Creates the query. /// </summary> /// <param name="field">The field.</param> /// <param name="value">The value.</param> /// <returns></returns> public static Filter CreateTermsFilter(string field, AttributeFilterValue value) { object val = value.Id; var query = new TermsFilter(); query.AddTerm(new Term(field, ConvertToSearchable(val, false))); return query; }