Issues with Typesense location entries and facet counts
TLDR Ed encountered issue with Typesense returning incorrect results and facet counts for location search. Jason and Kishore Nallan helped identify the problem and proposed a fix.
2
1
Aug 01, 2023 (2 months ago)
Ed
05:16 PMJason
05:17 PMdrop_tokens_threshold
setting which defaults to 1Jason
05:18 PMEd
05:18 PM1
Ed
05:21 PM1
Ed
05:28 PMI got 3 jobs with a location array, they are all in germany but in 3 different locations, so the facets show as 9 jobs
Jason
05:32 PMEd
05:34 PM{
"counts": [
{
"count": 3,
"highlighted": "Hamburg,Hamburg",
"value": "Hamburg,Hamburg"
},
{
"count": 3,
"highlighted": "Emden,Lower Saxony",
"value": "Emden,Lower Saxony"
},
{
"count": 3,
"highlighted": "Kiel,Schleswig-Holstein",
"value": "Kiel,Schleswig-Holstein"
}
],
"field_name": "data.locations.cityState",
"sampled": false,
"stats": {
"total_values": 3
}
},
{
"counts": [
{
"count": 3,
"highlighted": "Hamburg",
"value": "Hamburg"
},
{
"count": 3,
"highlighted": "Lower Saxony",
"value": "Lower Saxony"
},
{
"count": 3,
"highlighted": "Schleswig-Holstein",
"value": "Schleswig-Holstein"
}
],
"field_name": "data.locations.state",
"sampled": false,
"stats": {
"total_values": 3
}
},
{
"counts": [
{
"count": 9,
"highlighted": "Germany",
"value": "Germany"
}
],
"field_name": "data.locations.country",
"sampled": false,
"stats": {
"total_values": 1
}
}
],
"found": 3,
Ed
05:36 PM "locations": [
{
"address": "Werftstr. 112 - 114 , 24143 Kiel",
"city": "Kiel",
"cityState": "Kiel,Schleswig-Holstein",
"country": "Germany",
"state": "Schleswig-Holstein",
"stateShort": "SH",
"zipCode": "24143"
},
{
"address": "Hermann Blohm Str 3",
"city": "Hamburg",
"cityState": "Hamburg,Hamburg",
"country": "Germany",
"state": "Hamburg",
"stateShort": "Hamburg",
"zipCode": "20457"
},
{
"address": "Zum Zungenkai",
"city": "Emden",
"cityState": "Emden,Lower Saxony",
"country": "Germany",
"state": "Lower Saxony",
"stateShort": "NDS",
"zipCode": "26725"
}
],
Jason
06:20 PMEd
07:38 PMEd
07:41 PMcurl '' \
-H 'authority: ' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'content-type: text/plain' \
-H 'dnt: 1' \
-H 'origin: ' \
-H 'referer: ' \
-H 'sec-ch-ua: "Chromium";v="115", "Not/A)Brand";v="99"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: cross-site' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36' \
--data-raw '{"searches":[{"collection":"tkag_en","q":"Systemingenieur Systemmodellierung","query_by":"data.title,content","drop_tokens_threshold":0,"filter_by":"","sort_by":"_text_match:desc,data.postingDate_timestamp:desc","page":1,"per_page":50,"facet_by":"data.businessUnit,data.category,data.company,data.contract,data.employmentType,data.entryLevel,data.jobField,data.language,data.remote,data.locations.cityState,data.locations.state,data.locations.country","max_facet_values":500,"include_fields":"data,_geoloc"}]}' \
--compressed
Jason
07:52 PMAug 02, 2023 (2 months ago)
Ed
01:32 PMJason
04:47 PMEd
04:48 PM1
Aug 04, 2023 (2 months ago)
Ed
02:58 PMKishore Nallan
03:03 PM0.25.0.rc60
as well.Ed
03:18 PMTypesense
Indexed 2779 threads (79% resolved)
Similar Threads
Large JSONL Documents Import Issue & Resolution
Suraj was having trouble loading large JSONL documents into Typesense server. After several discussions and attempts, it was discovered that the issue was due to data quality. Once the team extracted the data again, the upload process worked smoothly.
Troubleshooting Issues with DocSearch Hits and Scraper Configuration
Rubai encountered issues with search result priorities and ellipsis. Jason helped debug the issue and suggested using different versions of typesense-docsearch.js, updating initialization parameters, and running the scraper on a Linux-based environment. The issues related to hits structure and scraper configuration were resolved.
Resolving Multilingual Search Function in Typesense Software
Bill is having difficulty with multilingual search functionality in Typesense software. Developer Kishore Nallan suggested setting a language locale and provided a demo build. The build solution had some issues, and after multiple rounds of software updates and troubleshooting, the problem still persists.
Troubleshooting Typesense Connection Issue and Data Retrieval
Felix encountered issues connecting to a server-created typesense and retrieving data collections. Kishore Nallan and Jason provided guidance, highlighting errors in the original code and suggesting changes to the URL and curl command.
Typesense Server Crash and Counting Issue
Dan reported a server crash and counting issues with Typesense server version 0.26.0.rc1. Jason suggested an upgrade to `0.26.0.rc13` while Kishore Nallan committed to investigate the issue based on a sample dataset from Dan.