Skip to content

Instantly share code, notes, and snippets.

View christofur's full-sized avatar

Chris Perks christofur

View GitHub Profile
christofur / HighlightingWithSitecoreAndSolr.cshtml
Created March 23, 2018 14:50
Highlighting With Sitecore and Solr
@using Sitecore.ContentSearch
@using Sitecore.ContentSearch.Linq.Parsing
@using Sitecore.ContentSearch.SearchTypes
@using Sitecore.ContentSearch.SolrProvider.SolrNetIntegration
@using SolrNet
@using SolrNet.Commands.Parameters
const string searchField = "summary_t";
const string searchValue = "traditional";
christofur / ChainedFiltersAnalyzer.cs
Created March 19, 2018 17:31
Simple Lucene.Net analyzer, demonstrating tokenizer and filter usage
using System.IO;
using Lucene.Net.Analysis;
using Lucene.Net.Analysis.Standard;
using Version = Lucene.Net.Util.Version;
public class ChainedFiltersAnalyzer : Analyzer
private const Version _version = Version.LUCENE_30;
public override TokenStream TokenStream(string fieldName, TextReader reader)
christofur / sitecore-analyzers.cs
Created June 13, 2017 18:06
Viewing Sitecore search analyzer output
using Lucene.Net.Analysis;
using Lucene.Net.Analysis.Fr;
using Lucene.Net.Analysis.Tokenattributes;
using Sitecore.ContentSearch.LuceneProvider.Analyzers;
using System;
using System.IO;
namespace SitecoreAnalyzers
class Program
christofur /
Created April 30, 2017 14:34
Java OO Kata 30/04/17
public interface IEntity {
public interface IWithName {
public String getName();
public void setName(String name);
public interface INamedEntity extends IEntity, IWithName {