Email Search Fail. How to solve

Having issue with my Email address field.
I have email address stored in upper case and when I search for those IDs in lower case from Java it says there are no records found.
Tried using Analyzer it doesnt help me.

GET /student-index/_search?q=student.student1@student.com

Value stored as :
{
"stuEmail":"STUDENT.STUDENT1@student.com"
}

Could you try:

GET /student-index/_search?q=stuEmail:student.student1@student.com

Thanks for reply,
I tried it but it doesn't work.

But also to be noted, User can search with stuName, or stuNumber or any field related to Student. (Email is one among them).
So I cannot restrict my query to field name.

Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

Sorry for the delay,

Below is my request looks like, when I try from my Java application.

Request 1:
GET /student_Records/_search?q=student.student1@student.com

Response 1:

{
"took" : 8,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 7.1873236,
"hits" : [
{
Student details
}
]
}

But if I try the same search with below request (Here the same search string is given in Upper case)

Request 2:
GET /student_Records/_search?q=STUDENT.STUDENT1@STUDENT.COM

Response 2: returns no records as below
{
"took" : 20363,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
}

I am trying to find an example for JAVA API to implement uax_url_email tokenizer, but couldnt find one.
Any help would be appreciated.

I'm afraid that's not a full example anyone can copy and paste in Kibana dev console to reproduce your problem. Read again About the Elasticsearch category . It contains an example which shows you what you should provide.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.