Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Perks christofur

View GitHub Profile
@christofur
christofur / HighlightingWithSitecoreAndSolr.cshtml
Created Mar 23, 2018
Highlighting With Sitecore and Solr
View HighlightingWithSitecoreAndSolr.cshtml
@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
christofur / ChainedFiltersAnalyzer.cs
Created Mar 19, 2018
Simple Lucene.Net analyzer, demonstrating tokenizer and filter usage
View ChainedFiltersAnalyzer.cs
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
christofur / sitecore-analyzers.cs
Created Jun 13, 2017
Viewing Sitecore search analyzer output
View sitecore-analyzers.cs
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
View java-oo-kata-1.java
public interface IEntity {
}
public interface IWithName {
public String getName();
public void setName(String name);
}
public interface INamedEntity extends IEntity, IWithName {
}