Skip to content

Instantly share code, notes, and snippets.

View adamlepkowski's full-sized avatar

Adam Łepkowski adamlepkowski

  • Poland, Wroclaw
View GitHub Profile
@adamlepkowski
adamlepkowski / EntityFrameworkQueryExtensions
Created March 18, 2018 13:28
Custom implementation of the Contains() method to support query plan caching
namespace EntityFrameworkFQueryExtensions
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using LinqKit;
// TEntity - based for every entity from the model
@adamlepkowski
adamlepkowski / built_in_analyzers
Last active October 25, 2016 10:12
Elasticsearch presentation
GET /_analyze
{
"analyzer": "standard",
"text": "Elastic Stack 5.0 was published 5 days ago (alpha version)"
}
GET /_analyze
{
"analyzer": "simple",
"text": "Elastic Stack 5.0 was published 5 days ago (alpha version)"
@adamlepkowski
adamlepkowski / analyzed_approach
Last active October 10, 2016 22:10
Elasticsearch phone numer
DELETE /phone_index
PUT /phone_index
{
"settings": {
"number_of_shards": 1,
"analysis": {
"filter": {
"whitespace_remover": {
"type": "pattern_replace",