pnpm install
pnpm dev
docker-compose up -d
curl -XPUT "http://localhost:9200/osm" -H 'Content-Type: application/json' -d'
{
index: 'osm',
settings: {
max_ngram_diff: 20,
analysis: {
filter: {
ngram_filter: {
type: 'ngram',
min_gram: 2,
max_gram: 20,
},
},
analyzer: {
ngram_analyzer: {
type: 'custom',
tokenizer: 'standard',
filter: ['lowercase', 'ngram_filter'],
},
},
},
},
mappings: {
properties: {
name: {
type: 'text',
term_vector: 'yes',
analyzer: 'ngram_analyzer',
search_analyzer: 'standard',
},
location: {
type: 'geo_point',
},
},
},
}'
curl -XGET "http://localhost:9200/_search" -H 'Content-Type: application/json' -d'
{
"query": {
"match_all": {}
}
}'
curl -XDELETE "http://localhost:9200/osm"
or
./deleteIndex