Slackbot
10/24/2023, 12:25 PMTrad Almelhem
10/24/2023, 3:33 PMJason Bosco
10/24/2023, 4:15 PMdrop_tokens_threshold: 1000 as a search parameterJason Bosco
10/24/2023, 4:15 PMTrad Almelhem
10/25/2023, 5:10 AMTrad Almelhem
10/25/2023, 1:57 PMJason Bosco
10/25/2023, 2:36 PMTrad Almelhem
10/26/2023, 6:04 AMTrad Almelhem
11/21/2023, 12:45 PM{
"facet_counts": [],
"found": 10,
"hits": [
{
"document": {
"avg_score": -1,
"company_id": "6d08cf7c-376c-4690-ba3a-9f7178e0f72f",
"distance": 0,
"driver_ident": "323223",
"email": "drivernover1@yahoo.com",
"entityType": "drivers",
"fusionauth_id": "e83a987b-73da-40fa-86d1-54ea8d59fe6c",
"id": "655b2ed946fc8bd4287d4b48",
"make": "toyota",
"model": "camry",
"name": "driver2",
"plate": "70-46693",
"searchField": "driver2 camry 70-46693 2022 323223 toyota",
"status": "available",
"trips_count": 0,
"vehicle_id": "6555ebfd6aab77f3513aea13",
"year": 2022
},
"highlight": {
"searchField": {
"matched_tokens": [
"drive"
],
"snippet": "<mark>drive</mark>r2 camry 70-46693 2022 323223 toyota"
}
},
"highlights": [
{
"field": "searchField",
"matched_tokens": [
"drive"
],
"snippet": "<mark>drive</mark>r2 camry 70-46693 2022 323223 toyota"
}
],
"text_match": 578730089005449300,
"text_match_info": {
"best_field_score": "1108074561536",
"best_field_weight": 15,
"fields_matched": 1,
"score": "578730089005449337",
"tokens_matched": 1
}
},
{
"document": {
"avg_score": 91.06184512434513,
"company_id": "6d08cf7c-376c-4690-ba3a-9f7178e0f72f",
"distance": 138.01999999999998,
"driver_ident": "23230202",
"email": "drivernov1@yahoo.com",
"entityType": "drivers",
"fusionauth_id": "716b5471-ea8c-44e6-b585-7019e0c29d52",
"id": "655b2eac46fc8bd4287d4b39",
"make": "toyota",
"model": "highlander",
"name": "driver1",
"plate": "70-45679",
"searchField": "driver1 highlander 70-45679 2022 23230202 toyota",
"status": "active",
"trips_count": 14,
"vehicle_id": "6555eb0d6aab77f3513ae9fb",
"year": 2022
},
"highlight": {
"searchField": {
"matched_tokens": [
"drive"
],
"snippet": "<mark>drive</mark>r1 highlander 70-45679 2022 23230202 toyota"
}
},
"highlights": [
{
"field": "searchField",
"matched_tokens": [
"drive"
],
"snippet": "<mark>drive</mark>r1 highlander 70-45679 2022 23230202 toyota"
}
],
"text_match": 578730089005449300,
"text_match_info": {
"best_field_score": "1108074561536",
"best_field_weight": 15,
"fields_matched": 1,
"score": "578730089005449337",
"tokens_matched": 1
}
}
],
"out_of": 23,
"page": 5,
"request_params": {
"collection_name": "drivers",
"per_page": 2,
"q": "drive"
},
"search_cutoff": false,
"search_time_ms": 1
}
the second one when i send search term as "driver" i got
{
"facet_counts": [],
"found": 9,
"hits": [
{
"document": {
"avg_score": -1,
"company_id": "6d08cf7c-376c-4690-ba3a-9f7178e0f72f",
"distance": 0,
"driver_ident": "323223",
"email": "drivernover1@yahoo.com",
"entityType": "drivers",
"fusionauth_id": "e83a987b-73da-40fa-86d1-54ea8d59fe6c",
"id": "655b2ed946fc8bd4287d4b48",
"make": "toyota",
"model": "camry",
"name": "driver2",
"plate": "70-46693",
"searchField": "driver2 camry 70-46693 2022 323223 toyota",
"status": "available",
"trips_count": 0,
"vehicle_id": "6555ebfd6aab77f3513aea13",
"year": 2022
},
"highlight": {
"searchField": {
"matched_tokens": [
"driver"
],
"snippet": "<mark>driver</mark>2 camry 70-46693 2022 323223 toyota"
}
},
"highlights": [
{
"field": "searchField",
"matched_tokens": [
"driver"
],
"snippet": "<mark>driver</mark>2 camry 70-46693 2022 323223 toyota"
}
],
"text_match": 578730089005449300,
"text_match_info": {
"best_field_score": "1108074561536",
"best_field_weight": 15,
"fields_matched": 1,
"score": "578730089005449337",
"tokens_matched": 1
}
}
],
"out_of": 23,
"page": 5,
"request_params": {
"collection_name": "drivers",
"per_page": 2,
"q": "driver"
},
"search_cutoff": false,
"search_time_ms": 1
}
I don't know why it excludes driver1 from the result. searchField is the field for searching.Trad Almelhem
11/21/2023, 1:03 PMconst searchParameters = {
q: query.term,
query_by: 'searchField',
num_typos: 1,
min_len_1typo: 5,
drop_tokens_threshold: 0,
filter_by: filterBy,
sort_by: sortBy,
per_page: query.perPage,
page: query.page,
};Jason Bosco
11/21/2023, 7:22 PMTrad Almelhem
11/22/2023, 6:16 AMTrad Almelhem
11/22/2023, 6:17 AMJason Bosco
11/22/2023, 3:25 PM