You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@baremaps.apache.org by "Perdjesk (via GitHub)" <gi...@apache.org> on 2023/07/19 09:44:21 UTC

[GitHub] [incubator-baremaps] Perdjesk commented on a diff in pull request #724: IPLoc precision levels, add metadata fields in iploc database

Perdjesk commented on code in PR #724:
URL: https://github.com/apache/incubator-baremaps/pull/724#discussion_r1267834691


##########
baremaps-server/src/main/java/org/apache/baremaps/server/GeocoderResource.java:
##########
@@ -54,15 +54,16 @@ public GeocoderResource(SearcherManager searcherManager) {
 
   @GET
   @javax.ws.rs.Path("/api/geocoder")
-  public Response getIpToLocation(
+  public Response searchLocations(
       @QueryParam("queryText") String queryText,
       @QueryParam("countryCode") @DefaultValue("") String countryCode,
       @QueryParam("limit") @DefaultValue("10") int limit) throws IOException {
     if (queryText == null) {
       throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST)
           .entity("The queryText parameter is mandatory").build());
     }
-    var query = new GeonamesQueryBuilder().queryText(queryText).countryCode(countryCode).build();
+    var query = new GeonamesQueryBuilder()
+        .queryText(queryText).countryCode(countryCode).withScoringByPopulation().build();

Review Comment:
   dropped the usage of prefix "with" to match builder naming based on field names. 5caf68cbe7d30f290bf2e61568bb7876758a347a



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@baremaps.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org