Ronak
03/02/2023, 2:15 PM<http://abc.pqr.xyz|abc.pqr.xyz> and would like to use . as also my split term token along with space, tab. So, in this example, I have three terms - abc, pqr and xyzMayank
Evan Galpin
03/02/2023, 7:46 PMstandard tokenizer (which I believe is effectively a passthrough to Lucene standard tokenizer) returns a singular token for `abc.pqr.xyz`:
POST /_analyze
{
"tokenizer": "standard",
"text": "<http://abc.pqr.xyz|abc.pqr.xyz>"
}
Response:
{
"tokens": [
{
"token": "<http://abc.pqr.xyz|abc.pqr.xyz>",
"start_offset": 0,
"end_offset": 11,
"type": "<ALPHANUM>",
"position": 0
}
]
}
Whereas letter tokenizer yields what you’re after:
POST /_analyze
{
"tokenizer": "letter",
"text": "<http://abc.pqr.xyz|abc.pqr.xyz>"
}
{
"tokens": [
{
"token": "abc",
"start_offset": 0,
"end_offset": 3,
"type": "word",
"position": 0
},
{
"token": "pqr",
"start_offset": 4,
"end_offset": 7,
"type": "word",
"position": 1
},
{
"token": "xyz",
"start_offset": 8,
"end_offset": 11,
"type": "word",
"position": 2
}
]
}Evan Galpin
03/02/2023, 7:49 PMRonak
03/03/2023, 5:24 AMMayank
Ronak
03/03/2023, 5:43 AM