{
"about": null,
"approved_point": 0,
"blocked": 0,
"email": "email",
"email_verify": 0,
"facebook_id": null,
"gender": null,
"google_id": null,
"home": {
"entry_lat": null,
"entry_lng": null,
"lat": null,
"lng": null,
"name": null,
"place_id": null
},
"last_visited": "2017-11-16 11:47:21",
"location": "",
"mobile": null,
"mobile_verify": 0,
"name": "anuj",
"new_password_key": null,
"office": {
"entry_lat": null,
"entry_lng": null,
"lat": null,
"lng": null,
"name": null,
"place_id": null
},
"password": "pass",
"password_requested_platform": null,
"password_requested_timestamp": null,
"permissions": [
"101"
],
"registered_timestamp": "2014-05-07 12:01:28",
"social_id": 101,
"stats": {
"added": 0,
"checkin": {
"others": 0,
"self": 0
},
"edited": 0,
"favourite": 0,
"follower": 0,
"following": 0,
},
"unapproved_point": 0,
"user_id": "usrid",
"user_name": "anuj",
"user_photo": "photopath"
}
Query-
select * from users USE INDEX (registered_timestamp_user_admin_search) where TOSTRING(
user_name
) LIKE “anu%” OR TOSTRING(name
) LIKE “anu%” OR TOSTRING(
Indexing-
CREATE INDEX
registered_timestamp_user_admin_search
ONbucket_name
(user_name
,name
);
The above query taking 5 sec in the 1.5 lakh documents
please help @vsr1