protected virtual string SetEmptyFieldValue(ContentSearchPortlet.EmptyQueryTermHandler mode, Field field) { if (mode == ContentSearchPortlet.EmptyQueryTermHandler.ReplaceToWildcard) { if (field is DateTimeField) { return(string.Format("{{{0} TO {1}}}", DateTime.MinValue, DateTime.MaxValue)); } if (field is IntegerField) { return(string.Format("{{{0} TO {1}}}", int.MinValue, int.MaxValue)); } return("*"); } if (mode == ContentSearchPortlet.EmptyQueryTermHandler.RemoveEmpty) { return(ContentQuery.EmptyText); } return(string.Empty); }
public DefaultQueryBuilder(string originalQuery, Content searchForm, ContentSearchPortlet.EmptyQueryTermHandler emptyTerm) { _originalQuery = originalQuery; _searchForm = searchForm; _emptyTermHandler = emptyTerm; }
public DefaultQueryBuilder(string originalQuery, Content searchForm,ContentSearchPortlet.EmptyQueryTermHandler emptyTerm) { _originalQuery = originalQuery; _searchForm = searchForm; _emptyTermHandler = emptyTerm; }