Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Elasticsearch url search
1) If pages index already exists delete it
curl -XDELETE http://localhost:9200/pages
1) Configure and create index
curl -XPUT http://localhost:9200/pages/ -d "
index :
filter: [standard, lowercase ]
tokenizer: uax_url_email
tokenizer: uax_url_email
filter: [standard, lowercase]"
2) Configuration appears to be working as a single token is returned in each case
curl http://localhost:9200/pages/_analyze?text=
curl http://localhost:9200/pages/_analyze?
3) Add searchable data
curl -XPUT localhost:9200/pages/page/1 -d '{
"content" : "use for search and email for questions."
4) Search for email returns result but url doesnot
curl http://localhost:9200/pages/_search?q=
curl http://localhost:9200/pages/_search?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment