Interface GeospatialIndicesBaseCommands

    • Method Detail

      • geoadd

        java.util.concurrent.CompletableFuture<java.lang.Long> geoadd​(java.lang.String key,
                                                                      java.util.Map<java.lang.String,​GeospatialData> membersToGeospatialData,
                                                                      GeoAddOptions options)
        Adds geospatial members with their positions to the specified sorted set stored at key .
        If a member is already a part of the sorted set, its position is updated.
        Parameters:
        key - The key of the sorted set.
        membersToGeospatialData - A mapping of member names to their corresponding positions - see GeospatialData. The command will report an error when the user attempts to index coordinates outside the specified ranges.
        options - The GeoAdd options - see GeoAddOptions
        Returns:
        The number of elements added to the sorted set. If changed is set to true in the options, returns the number of elements updated in the sorted set.
        See Also:
        valkey.io for more details.
        Example:
        
         GeoAddOptions options = new GeoAddOptions(ConditionalChange.ONLY_IF_EXISTS, true);
         Long num = client.geoadd("mySortedSet", Map.of("Palermo", new GeospatialData(13.361389, 38.115556)), options).get();
         assert num == 1L; // Indicates that the position of an existing member in the sorted set "mySortedSet" has been updated.
         
      • geoadd

        java.util.concurrent.CompletableFuture<java.lang.Long> geoadd​(GlideString key,
                                                                      java.util.Map<GlideString,​GeospatialData> membersToGeospatialData,
                                                                      GeoAddOptions options)
        Adds geospatial members with their positions to the specified sorted set stored at key .
        If a member is already a part of the sorted set, its position is updated.
        Parameters:
        key - The key of the sorted set.
        membersToGeospatialData - A mapping of member names to their corresponding positions - see GeospatialData. The command will report an error when the user attempts to index coordinates outside the specified ranges.
        options - The GeoAdd options - see GeoAddOptions
        Returns:
        The number of elements added to the sorted set. If changed is set to true in the options, returns the number of elements updated in the sorted set.
        See Also:
        valkey.io for more details.
        Example:
        
         GeoAddOptions options = new GeoAddOptions(ConditionalChange.ONLY_IF_EXISTS, true);
         Long num = client.geoadd(gs("mySortedSet"), Map.of(gs("Palermo"), new GeospatialData(13.361389, 38.115556)), options).get();
         assert num == 1L; // Indicates that the position of an existing member in the sorted set gs("mySortedSet") has been updated.
         
      • geoadd

        java.util.concurrent.CompletableFuture<java.lang.Long> geoadd​(java.lang.String key,
                                                                      java.util.Map<java.lang.String,​GeospatialData> membersToGeospatialData)
        Adds geospatial members with their positions to the specified sorted set stored at key .
        If a member is already a part of the sorted set, its position is updated.
        To perform a geoadd operation while specifying optional parameters, use geoadd(String, Map, GeoAddOptions).
        Parameters:
        key - The key of the sorted set.
        membersToGeospatialData - A mapping of member names to their corresponding positions - see GeospatialData. The command will report an error when the user attempts to index coordinates outside the specified ranges.
        Returns:
        The number of elements added to the sorted set.
        See Also:
        valkey.io for more details.
        Example:
        
         Long num = client.geoadd("mySortedSet", Map.of("Palermo", new GeospatialData(13.361389, 38.115556), "Catania", new GeospatialData(15.087269, 37.502669)).get();
         assert num == 2L; // Indicates that two elements have been added to the sorted set "mySortedSet".
         
      • geoadd

        java.util.concurrent.CompletableFuture<java.lang.Long> geoadd​(GlideString key,
                                                                      java.util.Map<GlideString,​GeospatialData> membersToGeospatialData)
        Adds geospatial members with their positions to the specified sorted set stored at key .
        If a member is already a part of the sorted set, its position is updated.
        To perform a geoadd operation while specifying optional parameters, use geoadd(String, Map, GeoAddOptions).
        Parameters:
        key - The key of the sorted set.
        membersToGeospatialData - A mapping of member names to their corresponding positions - see GeospatialData. The command will report an error when the user attempts to index coordinates outside the specified ranges.
        Returns:
        The number of elements added to the sorted set.
        See Also:
        valkey.io for more details.
        Example:
        
         Long num = client.geoadd(gs("mySortedSet"), Map.of(gs("Palermo"), new GeospatialData(13.361389, 38.115556), gs("Catania"), new GeospatialData(15.087269, 37.502669)).get();
         assert num == 2L; // Indicates that two elements have been added to the sorted set gs("mySortedSet").
         
      • geopos

        java.util.concurrent.CompletableFuture<java.lang.Double[][]> geopos​(java.lang.String key,
                                                                            java.lang.String[] members)
        Returns the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key.
        Parameters:
        key - The key of the sorted set.
        members - The members for which to get the positions.
        Returns:
        A 2D array which represent positions (longitude and latitude) corresponding to the given members. If a member does not exist, its position will be null.
        See Also:
        valkey.io for more details.
        Example:
        
         // When added via GEOADD, the geospatial coordinates are converted into a 52 bit geohash, so the coordinates
         // returned might not be exactly the same as the input values
         client.geoadd("mySortedSet", Map.of("Palermo", new GeospatialData(13.361389, 38.115556), "Catania", new GeospatialData(15.087269, 37.502669))).get();
         Double[][] result = client.geopos("mySortedSet", new String[]{"Palermo", "Catania", "NonExisting"}).get();
         System.out.println(Arrays.deepToString(result));
         
      • geopos

        java.util.concurrent.CompletableFuture<java.lang.Double[][]> geopos​(GlideString key,
                                                                            GlideString[] members)
        Returns the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key.
        Parameters:
        key - The key of the sorted set.
        members - The members for which to get the positions.
        Returns:
        A 2D array which represent positions (longitude and latitude) corresponding to the given members. If a member does not exist, its position will be null.
        See Also:
        valkey.io for more details.
        Example:
        
         // When added via GEOADD, the geospatial coordinates are converted into a 52 bit geohash, so the coordinates
         // returned might not be exactly the same as the input values
         client.geoadd(gs("mySortedSet"), Map.of(gs("Palermo"), new GeospatialData(13.361389, 38.115556), gs("Catania"), new GeospatialData(15.087269, 37.502669))).get();
         Double[][] result = client.geopos(gs("mySortedSet", new GlideString[]{gs("Palermo"), gs("Catania"), gs("NonExisting")}).get();
         System.out.println(Arrays.deepToString(result));
         
      • geodist

        java.util.concurrent.CompletableFuture<java.lang.Double> geodist​(java.lang.String key,
                                                                         java.lang.String member1,
                                                                         java.lang.String member2,
                                                                         GeoUnit geoUnit)
        Returns the distance between member1 and member2 saved in the geospatial index stored at key.
        Parameters:
        key - The key of the sorted set.
        member1 - The name of the first member.
        member2 - The name of the second member.
        geoUnit - The unit of distance measurement - see GeoUnit.
        Returns:
        The distance between member1 and member2. If one or both members do not exist, or if the key does not exist, returns null.
        See Also:
        valkey.io for more details.
        Example:
        
         Double result = client.geodist("mySortedSet", "Palermo", "Catania", GeoUnit.KILOMETERS).get();
         System.out.println(result);
         
      • geodist

        java.util.concurrent.CompletableFuture<java.lang.Double> geodist​(GlideString key,
                                                                         GlideString member1,
                                                                         GlideString member2,
                                                                         GeoUnit geoUnit)
        Returns the distance between member1 and member2 saved in the geospatial index stored at key.
        Parameters:
        key - The key of the sorted set.
        member1 - The name of the first member.
        member2 - The name of the second member.
        geoUnit - The unit of distance measurement - see GeoUnit.
        Returns:
        The distance between member1 and member2. If one or both members do not exist, or if the key does not exist, returns null.
        See Also:
        valkey.io for more details.
        Example:
        
         Double result = client.geodist(gs("mySortedSet"), gs("Palermo"), gs("Catania"), GeoUnit.KILOMETERS).get();
         System.out.println(result);
         
      • geodist

        java.util.concurrent.CompletableFuture<java.lang.Double> geodist​(java.lang.String key,
                                                                         java.lang.String member1,
                                                                         java.lang.String member2)
        Returns the distance between member1 and member2 saved in the geospatial index stored at key.
        Parameters:
        key - The key of the sorted set.
        member1 - The name of the first member.
        member2 - The name of the second member.
        Returns:
        The distance between member1 and member2. If one or both members do not exist, or if the key does not exist, returns null. The default unit is {@see GeoUnit#METERS}.
        See Also:
        valkey.io for more details.
        Example:
        
         Double result = client.geodist("mySortedSet", "Palermo", "Catania").get();
         System.out.println(result);
         
      • geodist

        java.util.concurrent.CompletableFuture<java.lang.Double> geodist​(GlideString key,
                                                                         GlideString member1,
                                                                         GlideString member2)
        Returns the distance between member1 and member2 saved in the geospatial index stored at key.
        Parameters:
        key - The key of the sorted set.
        member1 - The name of the first member.
        member2 - The name of the second member.
        Returns:
        The distance between member1 and member2. If one or both members do not exist, or if the key does not exist, returns null. The default unit is {@see GeoUnit#METERS}.
        See Also:
        valkey.io for more details.
        Example:
        
         Double result = client.geodist(gs("mySortedSet"), gs("Palermo"), gs("Catania")).get();
         System.out.println(result);
         
      • geohash

        java.util.concurrent.CompletableFuture<java.lang.String[]> geohash​(java.lang.String key,
                                                                           java.lang.String[] members)
        Returns the GeoHash strings representing the positions of all the specified members in the sorted set stored at key.
        Parameters:
        key - The key of the sorted set.
        members - The array of members whose GeoHash strings are to be retrieved.
        Returns:
        An array of GeoHash strings representing the positions of the specified members stored at key. If a member does not exist in the sorted set, a null value is returned for that member.
        See Also:
        valkey.io for more details.
        Example:
        
         String[] result = client.geohash("mySortedSet", new String[] {"Palermo", "Catania", "NonExisting"}).get();
         System.out.println(Arrays.toString(result)); // prints a list of corresponding GeoHash String values
         
      • geohash

        java.util.concurrent.CompletableFuture<GlideString[]> geohash​(GlideString key,
                                                                      GlideString[] members)
        Returns the GeoHash strings representing the positions of all the specified members in the sorted set stored at key.
        Parameters:
        key - The key of the sorted set.
        members - The array of members whose GeoHash strings are to be retrieved.
        Returns:
        An array of GeoHash strings representing the positions of the specified members stored at key. If a member does not exist in the sorted set, a null value is returned for that member.
        See Also:
        valkey.io for more details.
        Example:
        
         GlideString[] result = client.geohash(gs("mySortedSet"), new GlideString[] {gs("Palermo"), gs("Catania"), gs("NonExisting")}).get();
         System.out.println(Arrays.toString(result)); // prints a list of corresponding GeoHash String values
         
      • geosearch

        java.util.concurrent.CompletableFuture<java.lang.String[]> geosearch​(java.lang.String key,
                                                                             GeoSearchOrigin.SearchOrigin searchFrom,
                                                                             GeoSearchShape searchBy)
        Returns the members of a sorted set populated with geospatial information using geoadd(String, Map), which are within the borders of the area specified by a given shape.
        Parameters:
        key - The key of the sorted set.
        searchFrom - The query's center point options, could be one of:
        searchBy - The query's shape options:
        Returns:
        An array of matched member names.
        Since:
        Valkey 6.2.0 and above.
        See Also:
        valkey.io for more details.
        Example:
        
         String[] expected = new String[] {"Catania", "Palermo"};
         String[] result =
                        client
                                .geosearch(
                                        "a1",
                                        new GeoSearchOrigin.MemberOrigin("Palermo"),
                                        new GeoSearchShape(200, GeoUnit.KILOMETERS))
                                .get();
         assert Arrays.equals(expected, result);
         
      • geosearch

        java.util.concurrent.CompletableFuture<GlideString[]> geosearch​(GlideString key,
                                                                        GeoSearchOrigin.SearchOrigin searchFrom,
                                                                        GeoSearchShape searchBy)
        Returns the members of a sorted set populated with geospatial information using geoadd(String, Map), which are within the borders of the area specified by a given shape.
        Parameters:
        key - The key of the sorted set.
        searchFrom - The query's center point options, could be one of:
        searchBy - The query's shape options:
        Returns:
        An array of matched member names.
        Since:
        Valkey 6.2.0 and above.
        See Also:
        valkey.io for more details.
        Example:
        
         GlideString[] expected = new GlideString[] {gs("Catania"), gs("Palermo")};
         GlideString[] result =
                        client
                                .geosearch(
                                        gs("a1"),
                                        new GeoSearchOrigin.MemberOriginBinary(gs("Palermo")),
                                        new GeoSearchShape(200, GeoUnit.KILOMETERS))
                                .get();
         assert Arrays.equals(expected, result);
         
      • geosearch

        java.util.concurrent.CompletableFuture<java.lang.String[]> geosearch​(java.lang.String key,
                                                                             GeoSearchOrigin.SearchOrigin searchFrom,
                                                                             GeoSearchShape searchBy,
                                                                             GeoSearchResultOptions resultOptions)
        Returns the members of a sorted set populated with geospatial information using geoadd(String, Map), which are within the borders of the area specified by a given shape.
        Parameters:
        key - The key of the sorted set.
        searchFrom - The query's center point options, could be one of:
        searchBy - The query's shape options:
        resultOptions - Optional inputs for sorting/limiting the results. See - GeoSearchResultOptions
        Returns:
        An array of matched member names.
        Since:
        Valkey 6.2.0 and above.
        See Also:
        valkey.io for more details.
        Example:
        
         String[] expected = new String[] {"Catania", "Palermo"};
         String[] result =
                        client
                                .geosearch(
                                        "a1",
                                        new GeoSearchOrigin("Palermo"),
                                        new GeoSearchShape(200, GeoUnit.KILOMETERS),
                                        SortOrder.ASC)
                                .get();
         assert Arrays.equals(expected, result);
         
      • geosearch

        java.util.concurrent.CompletableFuture<GlideString[]> geosearch​(GlideString key,
                                                                        GeoSearchOrigin.SearchOrigin searchFrom,
                                                                        GeoSearchShape searchBy,
                                                                        GeoSearchResultOptions resultOptions)
        Returns the members of a sorted set populated with geospatial information using geoadd(String, Map), which are within the borders of the area specified by a given shape.
        Parameters:
        key - The key of the sorted set.
        searchFrom - The query's center point options, could be one of:
        searchBy - The query's shape options:
        resultOptions - Optional inputs for sorting/limiting the results. See - GeoSearchResultOptions
        Returns:
        An array of matched member names.
        Since:
        Valkey 6.2.0 and above.
        See Also:
        valkey.io for more details.
        Example:
        
         GlideString[] expected = new GlideString[] {gs("Catania"), gs("Palermo")};
         GlideString[] result =
                        client
                                .geosearch(
                                        gs("a1"),
                                        new GeoSearchOrigin.MemberOriginBinary(gs("Palermo")),
                                        new GeoSearchShape(200, GeoUnit.KILOMETERS),
                                        SortOrder.ASC)
                                .get();
         assert Arrays.equals(expected, result);
         
      • geosearch

        java.util.concurrent.CompletableFuture<java.lang.Object[]> geosearch​(java.lang.String key,
                                                                             GeoSearchOrigin.SearchOrigin searchFrom,
                                                                             GeoSearchShape searchBy,
                                                                             GeoSearchOptions options)
        Returns the members of a sorted set populated with geospatial information using geoadd(String, Map), which are within the borders of the area specified by a given shape.
        Parameters:
        key - The key of the sorted set.
        searchFrom - The query's center point options, could be one of:
        searchBy - The query's shape options:
        options - The optional inputs to request additional information.
        Returns:
        An array of arrays where each sub-array represents a single item in the following order:
        • The member (location) name.
        • The distance from the center as a Double, in the same unit specified for searchBy.
        • The geohash of the location as a Long.
        • The coordinates as a two item array of Double.
        Since:
        Valkey 6.2.0 and above.
        See Also:
        valkey.io for more details.
        Example:
        
         Object[] expected =
                    new Object[] {
                        new Object[] {
                             // name
                            "Palermo",
                            new Object[] {
                                // distance, hash and coordinates
                                0.0, 3479099956230698L, new Object[] {13.361389338970184, 38.1155563954963}
                            }
                        },
                        new Object[] {
                            "Catania",
                            new Object[] {
                                166.2742, 3479447370796909L, new Object[] {15.087267458438873, 37.50266842333162}
                            }
                        }
                    };
         Object[] result =
                        client
                                .geosearch(
                                        "a1",
                                        new GeoSearchOrigin("Palermo"),
                                        new GeoSearchShape(200, GeoUnit.KILOMETERS),
                                        new GeoSearchOptions.GeoSearchOptionsBuilder()
                                                     .withcoord()
                                                     .withdist()
                                                     .withhash()
                                                     .count(3)
                                                     .build(),
                                        SortOrder.ASC)
                                .get();
         // The result contains the data in the same format as expected.
         
      • geosearch

        java.util.concurrent.CompletableFuture<java.lang.Object[]> geosearch​(GlideString key,
                                                                             GeoSearchOrigin.SearchOrigin searchFrom,
                                                                             GeoSearchShape searchBy,
                                                                             GeoSearchOptions options)
        Returns the members of a sorted set populated with geospatial information using geoadd(String, Map), which are within the borders of the area specified by a given shape.
        Parameters:
        key - The key of the sorted set.
        searchFrom - The query's center point options, could be one of:
        searchBy - The query's shape options:
        options - The optional inputs to request additional information.
        Returns:
        An array of arrays where each sub-array represents a single item in the following order:
        • The member (location) name.
        • The distance from the center as a Double, in the same unit specified for searchBy.
        • The geohash of the location as a Long.
        • The coordinates as a two item array of Double.
        Since:
        Valkey 6.2.0 and above.
        See Also:
        valkey.io for more details.
        Example:
        
         Object[] expected =
                    new Object[] {
                        new Object[] {
                             // name
                            gs("Palermo"),
                            new Object[] {
                                // distance, hash and coordinates
                                0.0, 3479099956230698L, new Object[] {13.361389338970184, 38.1155563954963}
                            }
                        },
                        new Object[] {
                            gs("Catania"),
                            new Object[] {
                                166.2742, 3479447370796909L, new Object[] {15.087267458438873, 37.50266842333162}
                            }
                        }
                    };
         Object[] result =
                        client
                                .geosearch(
                                        gs("a1"),
                                        new GeoSearchOrigin.MemberOriginBinary(gs("Palermo")),
                                        new GeoSearchShape(200, GeoUnit.KILOMETERS),
                                        new GeoSearchOptions.GeoSearchOptionsBuilder()
                                                     .withcoord()
                                                     .withdist()
                                                     .withhash()
                                                     .count(3)
                                                     .build(),
                                        SortOrder.ASC)
                                .get();
         // The result contains the data in the same format as expected.
         
      • geosearch

        java.util.concurrent.CompletableFuture<java.lang.Object[]> geosearch​(java.lang.String key,
                                                                             GeoSearchOrigin.SearchOrigin searchFrom,
                                                                             GeoSearchShape searchBy,
                                                                             GeoSearchOptions options,
                                                                             GeoSearchResultOptions resultOptions)
        Returns the members of a sorted set populated with geospatial information using geoadd(String, Map), which are within the borders of the area specified by a given shape.
        Parameters:
        key - The key of the sorted set.
        searchFrom - The query's center point options, could be one of:
        searchBy - The query's shape options:
        options - The optional inputs to request additional information. See - GeoSearchOptions
        resultOptions - Optional inputs for sorting/limiting the results. See - GeoSearchResultOptions
        Returns:
        An array of arrays where each sub-array represents a single item in the following order:
        • The member (location) name.
        • The distance from the center as a Double, in the same unit specified for searchBy.
        • The geohash of the location as a Long.
        • The coordinates as a two item array of Double.
        Since:
        Valkey 6.2.0 and above.
        See Also:
        valkey.io for more details.
        Example:
        
         Object[] expected =
                    new Object[] {
                        new Object[] {
                             // name
                            "Palermo",
                            new Object[] {
                                // distance, hash and coordinates
                                0.0, 3479099956230698L, new Object[] {13.361389338970184, 38.1155563954963}
                            }
                        },
                        new Object[] {
                            "Catania",
                            new Object[] {
                                166.2742, 3479447370796909L, new Object[] {15.087267458438873, 37.50266842333162}
                            }
                        }
                    };
         Object[] result =
                        client
                                .geosearch(
                                        "a1",
                                        new GeoSearchOrigin("Palermo"),
                                        new GeoSearchShape(200, GeoUnit.KILOMETERS),
                                        new GeoSearchOptions.GeoSearchOptionsBuilder()
                                                     .withcoord()
                                                     .withdist()
                                                     .withhash()
                                                     .count(3)
                                                     .build(),
                                        SortOrder.ASC)
                                .get();
         // The result contains the data in the same format as expected.
         
      • geosearch

        java.util.concurrent.CompletableFuture<java.lang.Object[]> geosearch​(GlideString key,
                                                                             GeoSearchOrigin.SearchOrigin searchFrom,
                                                                             GeoSearchShape searchBy,
                                                                             GeoSearchOptions options,
                                                                             GeoSearchResultOptions resultOptions)
        Returns the members of a sorted set populated with geospatial information using geoadd(String, Map), which are within the borders of the area specified by a given shape.
        Parameters:
        key - The key of the sorted set.
        searchFrom - The query's center point options, could be one of:
        searchBy - The query's shape options:
        options - The optional inputs to request additional information. See - GeoSearchOptions
        resultOptions - Optional inputs for sorting/limiting the results. See - GeoSearchResultOptions
        Returns:
        An array of arrays where each sub-array represents a single item in the following order:
        • The member (location) name.
        • The distance from the center as a Double, in the same unit specified for searchBy.
        • The geohash of the location as a Long.
        • The coordinates as a two item array of Double.
        Since:
        Valkey 6.2.0 and above.
        See Also:
        valkey.io for more details.
        Example:
        
         Object[] expected =
                    new Object[] {
                        new Object[] {
                             // name
                            gs("Palermo"),
                            new Object[] {
                                // distance, hash and coordinates
                                0.0, 3479099956230698L, new Object[] {13.361389338970184, 38.1155563954963}
                            }
                        },
                        new Object[] {
                            gs("Catania"),
                            new Object[] {
                                166.2742, 3479447370796909L, new Object[] {15.087267458438873, 37.50266842333162}
                            }
                        }
                    };
         Object[] result =
                        client
                                .geosearch(
                                        gs("a1"),
                                        new GeoSearchOrigin.MemberOriginBinary(gs("Palermo")),
                                        new GeoSearchShape(200, GeoUnit.KILOMETERS),
                                        new GeoSearchOptions.GeoSearchOptionsBuilder()
                                                     .withcoord()
                                                     .withdist()
                                                     .withhash()
                                                     .count(3)
                                                     .build(),
                                        SortOrder.ASC)
                                .get();
         // The result contains the data in the same format as expected.
         
      • geosearchstore

        java.util.concurrent.CompletableFuture<java.lang.Long> geosearchstore​(java.lang.String destination,
                                                                              java.lang.String source,
                                                                              GeoSearchOrigin.SearchOrigin searchFrom,
                                                                              GeoSearchShape searchBy)
        Searches for members in a sorted set stored at source representing geospatial data within a circular or rectangular area and stores the result in destination. If destination already exists, it is overwritten. Otherwise, a new sorted set will be created. To get the result directly, see `geosearch(String, SearchOrigin, GeoSearchShape).
        Parameters:
        destination - The key of the destination sorted set.
        source - The key of the source sorted set.
        searchFrom - The query's center point options, could be one of:
        searchBy - The query's shape options:
        Returns:
        The number of elements in the resulting sorted set stored at destination.
        Since:
        Valkey 6.2.0 and above.
        See Also:
        valkey.io for more details.
        Example:
        
         Long result = client
                             .geosearchstore(
                                     destinationKey,
                                     sourceKey,
                                     new CoordOrigin(new GeospatialData(15, 37)),
                                     new GeoSearchShape(400, 400, GeoUnit.KILOMETERS))
                             .get();
         assert result == 4L;
         
      • geosearchstore

        java.util.concurrent.CompletableFuture<java.lang.Long> geosearchstore​(GlideString destination,
                                                                              GlideString source,
                                                                              GeoSearchOrigin.SearchOrigin searchFrom,
                                                                              GeoSearchShape searchBy)
        Searches for members in a sorted set stored at source representing geospatial data within a circular or rectangular area and stores the result in destination. If destination already exists, it is overwritten. Otherwise, a new sorted set will be created. To get the result directly, see `geosearch(String, SearchOrigin, GeoSearchShape).
        Parameters:
        destination - The key of the destination sorted set.
        source - The key of the source sorted set.
        searchFrom - The query's center point options, could be one of:
        searchBy - The query's shape options:
        Returns:
        The number of elements in the resulting sorted set stored at destination.
        Since:
        Valkey 6.2.0 and above.
        See Also:
        valkey.io for more details.
        Example:
        
         Long result = client
                             .geosearchstore(
                                     destinationKey,
                                     sourceKey,
                                     new CoordOrigin(new GeospatialData(15, 37)),
                                     new GeoSearchShape(400, 400, GeoUnit.KILOMETERS))
                             .get();
         assert result == 4L;
         
      • geosearchstore

        java.util.concurrent.CompletableFuture<java.lang.Long> geosearchstore​(java.lang.String destination,
                                                                              java.lang.String source,
                                                                              GeoSearchOrigin.SearchOrigin searchFrom,
                                                                              GeoSearchShape searchBy,
                                                                              GeoSearchResultOptions resultOptions)
        Searches for members in a sorted set stored at source representing geospatial data within a circular or rectangular area and stores the result in destination. If destination already exists, it is overwritten. Otherwise, a new sorted set will be created. To get the result directly, see `geosearch(String, SearchOrigin, GeoSearchShape, GeoSearchResultOptions).
        Parameters:
        destination - The key of the destination sorted set.
        source - The key of the source sorted set.
        searchFrom - The query's center point options, could be one of:
        searchBy - The query's shape options:
        resultOptions - Optional inputs for sorting/limiting the results. See - GeoSearchResultOptions
        Returns:
        The number of elements in the resulting sorted set stored at destination.
        Since:
        Valkey 6.2.0 and above.
        See Also:
        valkey.io for more details.
        Example:
        
         Long result = client
                             .geosearchstore(
                                     destinationKey,
                                     sourceKey,
                                     new CoordOrigin(new GeospatialData(15, 37)),
                                     new GeoSearchShape(400, 400, GeoUnit.KILOMETERS),
                                     new GeoSearchResultOptions(2, true))
                             .get();
         assert result == 2L;
         
      • geosearchstore

        java.util.concurrent.CompletableFuture<java.lang.Long> geosearchstore​(GlideString destination,
                                                                              GlideString source,
                                                                              GeoSearchOrigin.SearchOrigin searchFrom,
                                                                              GeoSearchShape searchBy,
                                                                              GeoSearchResultOptions resultOptions)
        Searches for members in a sorted set stored at source representing geospatial data within a circular or rectangular area and stores the result in destination. If destination already exists, it is overwritten. Otherwise, a new sorted set will be created. To get the result directly, see `geosearch(String, SearchOrigin, GeoSearchShape, GeoSearchResultOptions).
        Parameters:
        destination - The key of the destination sorted set.
        source - The key of the source sorted set.
        searchFrom - The query's center point options, could be one of:
        searchBy - The query's shape options:
        resultOptions - Optional inputs for sorting/limiting the results. See - GeoSearchResultOptions
        Returns:
        The number of elements in the resulting sorted set stored at destination.
        Since:
        Valkey 6.2.0 and above.
        See Also:
        valkey.io for more details.
        Example:
        
         Long result = client
                             .geosearchstore(
                                     destinationKey,
                                     sourceKey,
                                     new CoordOrigin(new GeospatialData(15, 37)),
                                     new GeoSearchShape(400, 400, GeoUnit.KILOMETERS),
                                     new GeoSearchResultOptions(2, true))
                             .get();
         assert result == 2L;
         
      • geosearchstore

        java.util.concurrent.CompletableFuture<java.lang.Long> geosearchstore​(java.lang.String destination,
                                                                              java.lang.String source,
                                                                              GeoSearchOrigin.SearchOrigin searchFrom,
                                                                              GeoSearchShape searchBy,
                                                                              GeoSearchStoreOptions options)
        Searches for members in a sorted set stored at source representing geospatial data within a circular or rectangular area and stores the result in destination. If destination already exists, it is overwritten. Otherwise, a new sorted set will be created. To get the result directly, see `geosearch(String, SearchOrigin, GeoSearchShape, GeoSearchOptions).
        Parameters:
        destination - The key of the destination sorted set.
        source - The key of the source sorted set.
        searchFrom - The query's center point options, could be one of:
        searchBy - The query's shape options:
        options - The optional inputs to request additional information.
        Returns:
        The number of elements in the resulting sorted set stored at destination.
        Since:
        Valkey 6.2.0 and above.
        See Also:
        valkey.io for more details.
        Example:
        
         Long result = client
                             .geosearchstore(
                                     destinationKey,
                                     sourceKey,
                                     new CoordOrigin(new GeospatialData(15, 37)),
                                     new GeoSearchShape(400, 400, GeoUnit.KILOMETERS),
                                     GeoSearchStoreOptions.builder().storedist().build())
                             .get();
         assert result == 4L;
         
      • geosearchstore

        java.util.concurrent.CompletableFuture<java.lang.Long> geosearchstore​(GlideString destination,
                                                                              GlideString source,
                                                                              GeoSearchOrigin.SearchOrigin searchFrom,
                                                                              GeoSearchShape searchBy,
                                                                              GeoSearchStoreOptions options)
        Searches for members in a sorted set stored at source representing geospatial data within a circular or rectangular area and stores the result in destination. If destination already exists, it is overwritten. Otherwise, a new sorted set will be created. To get the result directly, see `geosearch(String, SearchOrigin, GeoSearchShape, GeoSearchOptions).
        Parameters:
        destination - The key of the destination sorted set.
        source - The key of the source sorted set.
        searchFrom - The query's center point options, could be one of:
        searchBy - The query's shape options:
        options - The optional inputs to request additional information.
        Returns:
        The number of elements in the resulting sorted set stored at destination.
        Since:
        Valkey 6.2.0 and above.
        See Also:
        valkey.io for more details.
        Example:
        
         Long result = client
                             .geosearchstore(
                                     destinationKey,
                                     sourceKey,
                                     new CoordOrigin(new GeospatialData(15, 37)),
                                     new GeoSearchShape(400, 400, GeoUnit.KILOMETERS),
                                     GeoSearchStoreOptions.builder().storedist().build())
                             .get();
         assert result == 4L;
         
      • geosearchstore

        java.util.concurrent.CompletableFuture<java.lang.Long> geosearchstore​(java.lang.String destination,
                                                                              java.lang.String source,
                                                                              GeoSearchOrigin.SearchOrigin searchFrom,
                                                                              GeoSearchShape searchBy,
                                                                              GeoSearchStoreOptions options,
                                                                              GeoSearchResultOptions resultOptions)
        Searches for members in a sorted set stored at source representing geospatial data within a circular or rectangular area and stores the result in destination. If destination already exists, it is overwritten. Otherwise, a new sorted set will be created. To get the result directly, see `geosearch(String, SearchOrigin, GeoSearchShape, GeoSearchOptions, GeoSearchResultOptions).
        Parameters:
        destination - The key of the destination sorted set.
        source - The key of the source sorted set.
        searchFrom - The query's center point options, could be one of:
        searchBy - The query's shape options:
        options - The optional inputs to request additional information.
        resultOptions - Optional inputs for sorting/limiting the results. See - GeoSearchResultOptions
        Returns:
        The number of elements in the resulting sorted set stored at destination.
        Since:
        Valkey 6.2.0 and above.
        See Also:
        valkey.io for more details.
        Example:
        
         Long result = client
                             .geosearchstore(
                                     destinationKey,
                                     sourceKey,
                                     new CoordOrigin(new GeospatialData(15, 37)),
                                     new GeoSearchShape(400, 400, GeoUnit.KILOMETERS),
                                     GeoSearchStoreOptions.builder().storedist().build()
                                     new GeoSearchResultOptions(2, true))
                             .get();
         assert result == 2L;
         
      • geosearchstore

        java.util.concurrent.CompletableFuture<java.lang.Long> geosearchstore​(GlideString destination,
                                                                              GlideString source,
                                                                              GeoSearchOrigin.SearchOrigin searchFrom,
                                                                              GeoSearchShape searchBy,
                                                                              GeoSearchStoreOptions options,
                                                                              GeoSearchResultOptions resultOptions)
        Searches for members in a sorted set stored at source representing geospatial data within a circular or rectangular area and stores the result in destination. If destination already exists, it is overwritten. Otherwise, a new sorted set will be created. To get the result directly, see `geosearch(String, SearchOrigin, GeoSearchShape, GeoSearchOptions, GeoSearchResultOptions).
        Parameters:
        destination - The key of the destination sorted set.
        source - The key of the source sorted set.
        searchFrom - The query's center point options, could be one of:
        searchBy - The query's shape options:
        options - The optional inputs to request additional information.
        resultOptions - Optional inputs for sorting/limiting the results. See - GeoSearchResultOptions
        Returns:
        The number of elements in the resulting sorted set stored at destination.
        Since:
        Valkey 6.2.0 and above.
        See Also:
        valkey.io for more details.
        Example:
        
         Long result = client
                             .geosearchstore(
                                     destinationKey,
                                     sourceKey,
                                     new CoordOrigin(new GeospatialData(15, 37)),
                                     new GeoSearchShape(400, 400, GeoUnit.KILOMETERS),
                                     GeoSearchStoreOptions.builder().storedist().build()
                                     new GeoSearchResultOptions(2, true))
                             .get();
         assert result == 2L;