Hey all! I'm not seeing some oddities when perform...
# community-help
a
Hey all! I'm not seeing some oddities when performing a geosearch via a Join between two collections. I have a small sample set to test accuracy yet seeing two different results, regardless if I'm using single or multi-search. When using the Javascript SDK, no results are found. When making the request directly, I'm left with "Failed to join on `vendor_addresses_20250220_223920654Z`: No reference field found." Notes • Each collections were created with different names (ex:
vendors_YYYYMMDD
) but have aliases configured with the below collection names (
vendors
and
vendor_addresses
) • I have painstakingly verified that each geopoint is being stored and queried in Lat/Long order. Collections Snipped of each collection
Copy code
// Entity collection
{
    name: 'vendors',
    fields: [
        {
            name: 'id',
            type: 'string',
            facet: false
        }, {
            name: 'overview',
            type: 'string',
            facet: false,
            index: true,
        }, {
            name: 'updatedAt',
            type: 'int64',
            facet: false,
            index: true
        }],
    default_sorting_field: 'updatedAt',
}
// Vendor Address Collection
{
    name: 'vendor_addresses',
    fields: [
        {
            name: 'id',
            type: 'string',
            facet: false,
        },
        {
            name: 'vendorId',
            type: 'string',
            reference: "vendors.id",
        },
        {
            name: 'geolocation',
            type: 'geopoint',
            index: true,
        }
    ],
    default_sorting_field: 'vendorId',
}
Would really appreciate any and all help here!
Example multi-search payload that returns no results:
Copy code
{
  "searches": [
    {
      "collection": "vendors",
      "query_by": "services,overview,name",
      "limit": 10,
      "prioritize_exact_match": false,
      "filter_by": "$vendor_addresses(geolocation:(39.11553139999999, -94.62678729999999, 200.00 mi)) && enabled:true",
      "facet_strategy": "exhaustive",
      "q": "roofing service",
      "query_by_weights": "3,2,1",
      "vector_query": "someEmbeddings:([], queries:[roofing, roofing services, roof repair, roof replacement], query_weights:[0.4, 0.3, 0.2, 0.1], alpha:0.75)",
      "include_fields": "id,domain",
      "exclude_fields": "pageSummaryEmbeddings",
      "prefix": false,
      "sort_by": "_vector_distance:asc,_text_match:desc"
    }
  ]
}
I've also tried filters like below with similar/no results: •
$vendor_addresses(vendorId:* && geolocation:(39.11553139999999, -94.62678729999999, 200.00 mi))
$vendor_addresses(id:* && geolocation:(39.11553139999999, -94.62678729999999, 200.00 mi))
j
CC: @Harpreet Sangar
thankyou 1
a
Additionally, I've tried this with both v27.1 and v28
h
Hi @Adam Al-dbhany Can you check if
geolocation:(39.11553139999999, -94.62678729999999, 200.00 mi)
filter matches documents in
vendor_addresses
collections? Also, let me know if this search includes the related vendor.
Copy code
"collection": "vendor_addresses",
"q": "*",
"filter_by": "geolocation:(39.11553139999999, -94.62678729999999, 200.00 mi)",
"include_fields": "$vendors(*)"
I'm trying to figure out if the references are present or not.
a
Querying the
vendor_addresses
with the geolocation filter does give the results I would expect. I can test out the
include_fields
once I'm freed up
1