@@ -703,8 +703,7 @@ protected function removeExistingOrdersFor($column): array
703703 function ($ orderColumn ) use ($ column ) {
704704 return $ orderColumn === $ column
705705 || ($ orderColumn === 'id ' && $ column === '_id ' )
706- || ($ orderColumn === '_id ' && $ column === 'id '
707- );
706+ || ($ orderColumn === '_id ' && $ column === 'id ' );
708707 },
709708 );
710709
@@ -1871,4 +1870,59 @@ public function orWhereIntegerNotInRaw($column, $values, $boolean = 'and')
18711870 {
18721871 throw new BadMethodCallException ('This method is not supported by MongoDB ' );
18731872 }
1873+
1874+ /**
1875+ * Base method from Laravel >= 13.0
1876+ * ToDo: mark as `#[Override]` when we drop support for Laravel < 13.0
1877+ *
1878+ * @internal This method is not supported by MongoDB. Use vectorSearch() instead.
1879+ */
1880+ public function whereVectorSimilarTo ($ column , $ vector , $ minSimilarity = 0.6 , $ order = true )
1881+ {
1882+ throw new BadMethodCallException ('This method is not supported by MongoDB. Use vectorSearch() instead. ' );
1883+ }
1884+
1885+ /**
1886+ * Base method from Laravel >= 13.0
1887+ * ToDo: mark as `#[Override]` when we drop support for Laravel < 13.0
1888+ *
1889+ * @internal This method is not supported by MongoDB. Use vectorSearch() with the $filter parameter instead.
1890+ */
1891+ public function whereVectorDistanceLessThan ($ column , $ vector , $ maxDistance , $ boolean = 'and ' )
1892+ {
1893+ throw new BadMethodCallException ('This method is not supported by MongoDB. Use vectorSearch() with the $filter parameter instead. ' );
1894+ }
1895+
1896+ /**
1897+ * Base method from Laravel >= 13.0
1898+ * ToDo: mark as `#[Override]` when we drop support for Laravel < 13.0
1899+ *
1900+ * @internal This method is not supported by MongoDB. Use vectorSearch() with the $filter parameter instead.
1901+ */
1902+ public function orWhereVectorDistanceLessThan ($ column , $ vector , $ maxDistance )
1903+ {
1904+ throw new BadMethodCallException ('This method is not supported by MongoDB. Use vectorSearch() with the $filter parameter instead. ' );
1905+ }
1906+
1907+ /**
1908+ * Base method from Laravel >= 13.0
1909+ * ToDo: mark as `#[Override]` when we drop support for Laravel < 13.0
1910+ *
1911+ * @internal This method is not supported by MongoDB. Use vectorSearch() instead, which returns vectorSearchScore in the result.
1912+ */
1913+ public function selectVectorDistance ($ column , $ vector , $ as = null )
1914+ {
1915+ throw new BadMethodCallException ('This method is not supported by MongoDB. Use vectorSearch() instead, which returns vectorSearchScore in the result. ' );
1916+ }
1917+
1918+ /**
1919+ * Base method from Laravel >= 13.0
1920+ * ToDo: mark as `#[Override]` when we drop support for Laravel < 13.0
1921+ *
1922+ * @internal This method is not supported by MongoDB. Use vectorSearch() instead, which returns results ordered by vector score.
1923+ */
1924+ public function orderByVectorDistance ($ column , $ vector = [])
1925+ {
1926+ throw new BadMethodCallException ('This method is not supported by MongoDB. Use vectorSearch() instead, which returns results ordered by vector score. ' );
1927+ }
18741928}
0 commit comments