File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
google-cloud-datastore/src/main/java/com/google/cloud/datastore Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,7 @@ public enum DistanceMeasure {
191191 * unit normalized vectors instead of COSINE distance, which is mathematically equivalent with
192192 * better performance.
193193 */
194+ DISTANCE_MEASURE_UNSPECIFIED ,
194195 COSINE ,
195196 /** Measures the EUCLIDEAN distance between the vectors. */
196197 EUCLIDEAN ,
Original file line number Diff line number Diff line change @@ -917,7 +917,7 @@ B mergeFrom(com.google.datastore.v1.Query queryPb) {
917917 for (com .google .datastore .v1 .PropertyReference distinctOnPb : queryPb .getDistinctOnList ()) {
918918 addDistinctOn (distinctOnPb .getName ());
919919 }
920- if (queryPb .getFindNearest () != null ) {
920+ if (queryPb .getFindNearest () != null && queryPb . getFindNearest () != com . google . datastore . v1 . FindNearest . getDefaultInstance () ) {
921921 setFindNearest (FindNearest .fromPb (queryPb .getFindNearest ()));
922922 }
923923 return self ();
You can’t perform that action at this time.
0 commit comments