private ScrolledSearchResult <DocumentElastic> FilterInternal(
            GlobalStoreDataSet dataSet,
            string generalQuery, List <string> tagIds, int limit, string orderBy,
            bool isDescending, List <string> documentObjectFields)
        {
            var searchResult = DocumentQuery(dataSet.IndexName)
                               .Filter(
                generalQuery,
                tagIds,
                dataSet.DataSet.TagField,
                limit,
                orderBy,
                isDescending,
                dataSet.DataSet.InterpretedFields,
                dataSet.DocumentFields,
                documentObjectFields);

            return(searchResult);
        }
        public static List <string> GetFieldFilter(GlobalStoreDataSet dataSet, IEnumerable <string> fields)
        {
            var fieldList = new List <string>(fields ?? new string[] { });

            if (!fieldList.Any())
            {
                fieldList.Add(dataSet.DataSet.IdField);
                fieldList.Add(dataSet.DataSet.TagField);
                fieldList.AddRange(dataSet.DataSet.InterpretedFields);

                // Remove attachment type fields
                fieldList = fieldList.Except(dataSet.AttachmentFields).ToList();
            }
            else if (fieldList.Contains(_allFieldCharacter))
            {
                fieldList.Clear();
                fieldList.AddRange(dataSet.DocumentFields);
            }

            return(fieldList);
        }
 public void Add(string name, GlobalStoreDataSet dataSet)
 {
     DataSetsDictionary.Add(name, dataSet);
 }