Hi,
We attempted to index @/#'s on our Elasticsearch, so we could search for example "#bitcoin". See here our settings for our Index "users" (some settings I replaced with "PRIVATE"):
"users": {
"settings": {
"index": {
"number_of_shards": "PRIVATE",
"provided_name": "users",
"creation_date": "PRIVATE",
"analysis": {
"filter": {
"hashtag_as_alphanum": {
"type": "word_delimiter",
"type_table": [
"# => ALPHANUM",
"@ => ALPHANUM"
]
}
},
"analyzer": {
"hashtag": {
"filter": [
"lowercase",
"hashtag_as_alphanum"
],
"char_filter": "space_hashtags",
"type": "custom",
"tokenizer": "whitespace"
}
},
"char_filter": {
"space_hashtags": {
"type": "mapping",
"mappings": [
"#=>|#"
]
}
}
},
"number_of_replicas": "1",
"uuid": "PRIVATE",
"version": {
"created": "135217827"
}
}
}
}
When, in Python, I try to search for "#bitcoin":
resp = requests.get(ELASTICSEARCH_URL + "/_search", auth=AUTH, params=params)
with params = {"q": "#bitcoin"}, I still get results with just "bitcoin". I followed this guide: Finding Hashtags in Elasticsearch 1.7, and tried: "_analyze?analyzer=hashtag", but have not managed to query #/@'s successfully. Would someone be able to share an example query by any chance?
Thank you in advance!