Skip to content

Instantly share code, notes, and snippets.

/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using Lucene.Net.Analysis;
using Lucene.Net.Analysis.Snowball;
using Lucene.Net.Analysis.Standard;
namespace Search
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Examine;
using Examine.LuceneEngine.Providers;
using Lucene.Net.Analysis;
using Lucene.Net.Highlight;
using Lucene.Net.QueryParsers;
using Lucene.Net.Search;
using System;
using System.Reflection;
using Eduserv.UmbracoCMS.Services.Interfaces;
using Examine;
using Examine.LuceneEngine;
using log4net;
using Lucene.Net.Documents;
using Microsoft.Practices.ServiceLocation;
using Umbraco.Core;
using UmbracoExamine;
@abriggs-eduserv
abriggs-eduserv / FacetedSearch.cshtml
Created December 20, 2014 13:16
Complete demo MacroPartial from 24days.in/umbraco article
@using BoboBrowse.Api
@using BoboBrowse.Facets
@using BoboBrowse.Facets.impl
@using Examine;
@using Examine.LuceneEngine.Providers
@using Lucene.Net.Search
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@{
// creating a browse request
var browseRequest = new BrowseRequest
@abriggs-eduserv
abriggs-eduserv / SanitiseUserQuery
Created December 20, 2014 11:39
Sanitise user input before parsing by Lucene
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.UI.WebControls;
namespace ICO.Web.Analysis
{
public static class LuceneHelper