public int[] Search(SearchApiModel model)
        {
            var sp = new MainSearch();

            if (!string.IsNullOrEmpty(model.SearchText))
            {
                sp.SearchText = model.SearchText;
            }
            if (model.Classifiers?.Count > 0)
            {
                model.Classifiers.ForEach(x => sp.ClassificatorsGroups.Add(new System.Collections.Generic.List <string> {
                    x
                }));
                //sp.ClassificatorsGroups.Add(model.Classifiers);
            }
            var queries = sp.GetQueries();
            var ids     = this.searchWrapper.SearchDictQueryList(queries, true);

            ids = this.resultsGrouper.FilterConsolidatedLanguageVersions(ids, this.filterDocsStruct, model.LangPreferences);

            if (model.LangPreferences?.Length > 0)
            {
                this.filterDocsStruct.FilterArray(ref ids, model.LangPreferences);
            }

            //cons versions grouper
            ids = this.resultsGrouper.FilterResults(ids);
            return(ids);
        }
Exemple #2
0
        private void All_Click(object sender, RoutedEventArgs e)
        {
            SlideShow ss = new SlideShow(new string[0], prof, Data, savesettings);

            ss.Show();
            MainSearch.Text = "";
            MainSearch.ClearValue(BackgroundProperty);
        }
Exemple #3
0
 private void Main_Click(object sender, RoutedEventArgs e)
 {
     if (MainSearch.Text == "")
     {
         MainSearch.Background = Brushes.LightPink;
         MainSearch.Text       = "";
     }
     else
     {
         if (files.Count > 0)
         {
             filearray = files.ToArray();
             SlideShow ss = new SlideShow(filearray, prof, Data, savesettings);
             ss.Show();
             MainSearch.Text = "";
             MainSearch.ClearValue(BackgroundProperty);
         }
         else
         {
             MainSearch.Background = Brushes.LightPink;
             MainSearch.Text       = "";
         }
     }
 }
Exemple #4
0
 public Query(MainSearch qForm)
 {
     InitializeComponent();
     mainSearch = qForm;
 }
 public SearchProvider()
 {
     _searcher = new MainSearch();
 }
Exemple #6
0
 public CustomPretraga(PropertyInterface property, MainSearch search)
 {
     InitializeComponent();
     this.myProperty = property;
     this.search     = search;
 }