<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using otr_project.Models;
using otr_project.ViewModels;
using otr_project.Utils;
using System.Data.Entity;
using System.Text.RegularExpressions;
using System.Globalization;
using Webdiyer.WebControls.Mvc;

namespace otr_project.Controllers
{
    public class SearchController : Controller
    {
        const int ITEMS_PER_PAGE = 3;
        MarketPlaceEntities market = new MarketPlaceEntities();
        ErrorMessageViewModel ErrorMessage = new ErrorMessageViewModel();

        //
        // GET: /Search/
        public ActionResult Index(string search, int? id, FormCollection collection)
        {
            try
            {
                List<SearchItemViewModel> items = new List<SearchItemViewModel>();
                int category = 0;

                foreach (ItemModel i in market.Items)
                {
                    // If item is marked as inactive we shouldn't display it.
                    if (!i.isActive)
                        continue;
<commit_msg>Minor edit to search controller<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using otr_project.Models;
using otr_project.ViewModels;
using otr_project.Utils;
using System.Data.Entity;
using System.Text.RegularExpressions;
using System.Globalization;
using Webdiyer.WebControls.Mvc;

namespace otr_project.Controllers
{
    public class SearchController : Controller
    {
        const int ITEMS_PER_PAGE = 12;
        MarketPlaceEntities market = new MarketPlaceEntities();
        ErrorMessageViewModel ErrorMessage = new ErrorMessageViewModel();

        //
        // GET: /Search/
        public ActionResult Index(string search, int? id, FormCollection collection)
        {
            try
            {
                List<SearchItemViewModel> items = new List<SearchItemViewModel>();
                int category = 0;

                foreach (ItemModel i in market.Items)
                {
                    // If item is marked as inactive we shouldn't display it.
                    if (!i.isActive)
                        continue;

{'fraction_non_alphanumeric': 0.07433945364979848, 'fraction_numerical': 0.0022391401701746527, 'mean_word_length': 2.2708638360175697, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2356454', 'n_tokens_mistral': 587, 'n_tokens_neox': 561, 'n_words': 160}