Guiding GeoPoint Search with Typesense's Polygon
TLDR Ignacio had trouble with geopoint search in Typesense. Jason helped them solve it by using the counter-clockwise method with polygon points. The solution was posted on GitHub for future reference.
2
1
1
Aug 03, 2021 (28 months ago)
Ignacio
04:22 PMJason
04:24 PMIgnacio
04:24 PMIgnacio
04:25 PM"{"q":"*","query_by":"title,address,listingId","page":1,"filter_by":"location:(20.643101970825, -105.2271453804, 20.647860850082, -105.22630853119, 20.646696243606, -105.22096557083, 20.646897038462, -105.22055787506, 20.646756482091, -105.22010726395, 20.641214441604, -105.22118014755, 20.641234521826, -105.22208136978, 20.642057808619, -105.22328299942)"}"
Ignacio
04:26 PMThe polygon's points must be defined in a *counter-clockwise (i.e. anti-clockwise) direction*.
Ignacio
04:26 PMJason
04:28 PMJason
04:30 PMJason
04:31 PMIgnacio
04:31 PMJason
04:32 PMIgnacio
04:32 PMrequest_params
Ignacio
04:32 PM{"collection_name":"properties","per_page":10,"q":"*"}
Ignacio
04:32 PMJason
04:33 PMrequest_params
in the response contains just enough information to render most search UIs and not all the params that were sentIgnacio
04:33 PMIgnacio
04:34 PM1
Ignacio
04:36 PMIgnacio
04:36 PM"{"q":"*","query_by":"title,address,listingId","page":1,"filter_by":"location:(20.647836009729, -105.22632746033, 20.643036969737, -105.22716430954, 20.642032967319, -105.22321609787, 20.641149439709, -105.2214994841, 20.641591204155, -105.22109178833, 20.646832038996, -105.22008327774)"}"
Ignacio
04:36 PMIgnacio
04:39 PMIgnacio
04:40 PMIgnacio
04:40 PMIgnacio
04:40 PMIgnacio
04:52 PM$polygonSource = $sourceSearch->polygon;
if ($polygonSource[0]->lat < $polygonSource[1]->lat) {
$polygonSource = array_reverse($polygonSource);
}
Ignacio
04:53 PM1
Jason
05:16 PMJason
05:17 PMIgnacio
05:18 PM1
Ignacio
05:34 PMIgnacio
05:34 PM1
Typesense
Indexed 2779 threads (79% resolved)
Similar Threads
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 Setup and Understanding Facets and Keywords
Demitri encountered errors when exploring Typesense for the first time. Jason guided them through troubleshooting and discussed facets, keyword settings, and widget configurations. Helin shared a Python demo app and its source code to help Demitri with their project.
Integrating Semantic Search with Typesense
Krish wants to integrate a semantic search functionality with typesense but struggles with the limitations. Kishore Nallan provides resources, clarifications and workarounds to the raised issues.
Querying with Typesense-Js and Handling Null Values
michtio was querying using typesense-js and receiving fewer results than expected. Kishore Nallan suggested using different query parameters. Further discussion led to the handling of 'null' values and filtering syntax in the search queries. The thread ended with Jason offering migration support from Algolia to Typesense.