Skip to content

Instantly share code, notes, and snippets.

View diloabininyeri's full-sized avatar
🏠
Working from home

Dılo abinin yeri diloabininyeri

🏠
Working from home
View GitHub Profile
server {
listen 80;
listen [::]:80;
root /usr/share/nginx/html;
index index.php index.html index.htm index.nginx-debian.html;
server_name lol.com;
<?php
/**
* Class Pool
* @author dılo sürücü <berxudar@gmail.com>
* example pool design pattern
*/
Class Pool
{
<?php
/**
* @author dılo sürücü <berxudar@gmaili.com>
* php pure from structure basic middleware example
*
*/
Class MiddlewareFirst
{
GET http://localhost:9200/accounts/person/_search
Content-Type: application/json
{
"query": {
"multi_match": {
"query": "backend dılo",
"fields":["*"],
"minimum_should_match":1,
"slop":1
<?php
require_once "vendor/autoload.php";
use Elasticsearch\ClientBuilder;
$client = ClientBuilder::create()->build();
POST http://localhost:9200/accounts/person/_search
Content-Type: application/json
{
"query": {
"query_string": {
"query":"lahmac*",
"fields":["name","lastname","job_description"]
}
@diloabininyeri
diloabininyeri / example bool query compound query
Last active November 19, 2018 08:53
elasticsearch bool,must,mus_not compound query example
POST http://localhost:9200/accounts/person/_search
Content-Type: application/json
{
"query": {
"bool": {
"must": {
"multi_match": {
"query": "sevda",
"fields": [
@diloabininyeri
diloabininyeri / elasticsearch bool, sort, must,must_not,range query example
Last active November 19, 2018 09:14
elasticsearch bool,must,must_not,sort,sort example
POST http://localhost:9200/accounts/person/_search
Content-Type: application/json
{
"query": {
"bool": {
"must": {
"multi_match": {
"query": "sevda",
"fields": [
POST http://localhost:9200/accounts/person/_search
Content-Type: application/json
{
"suggest": {
"mysuggest-example": {
"text": "jon",
"term": {
"field": "name",
@diloabininyeri
diloabininyeri / elasticsearch similar find multi_match fuzzines example
Created November 27, 2018 11:28
ı searching kadir but ı writin kader and that is have misspeling in my word, even elasticsearch find kadir
request
POST http://localhost:9200/personels/musteri/_search
Content-Type: application/json
{
"query": {
"multi_match": {
"query": "kader",
"fuzziness": "AUTO"