Adam Al-dbhany
02/20/2025, 10:49 PMvendors_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
// 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!Adam Al-dbhany
02/20/2025, 10:51 PM{
"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"
}
]
}
Adam Al-dbhany
02/20/2025, 10:52 PM$vendor_addresses(vendorId:* && geolocation:(39.11553139999999, -94.62678729999999, 200.00 mi))
• $vendor_addresses(id:* && geolocation:(39.11553139999999, -94.62678729999999, 200.00 mi))
Jason Bosco
02/20/2025, 11:01 PMAdam Al-dbhany
02/20/2025, 11:04 PMHarpreet Sangar
02/21/2025, 4:18 AMgeolocation:(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.
"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.Adam Al-dbhany
02/21/2025, 4:29 PMvendor_addresses
with the geolocation filter does give the results I would expect.
I can test out the include_fields
once I'm freed up