From f34d4b6bbb642761658b21e78be3d195cf1c7dc2 Mon Sep 17 00:00:00 2001 From: mountford Date: Tue, 19 Sep 2017 07:48:52 -0700 Subject: [PATCH] Resolve RDAP TODO without action There was a TODO to consider making RDAP queries look up domains by foreign key rather than directly to the domain itself. But since the TLD is a possible search filter, it makes more sense to stick with direct lookup, so we can take advantage of the index on TLD. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=169240318 --- java/google/registry/rdap/RdapDomainSearchAction.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/google/registry/rdap/RdapDomainSearchAction.java b/java/google/registry/rdap/RdapDomainSearchAction.java index 8049b4bda..6fc60d799 100644 --- a/java/google/registry/rdap/RdapDomainSearchAction.java +++ b/java/google/registry/rdap/RdapDomainSearchAction.java @@ -210,7 +210,8 @@ public class RdapDomainSearchAction extends RdapActionBase { if (partialStringQuery.getSuffix() != null) { query = query.filter("tld", partialStringQuery.getSuffix()); } - // TODO(mountford): Investigate fetching by foreign key instead of the domain itself. + // Query the domains directly, rather than the foreign keys, because then we have an index on + // TLD if we need it. for (DomainResource domain : query.limit(RESULT_SET_SIZE_SCALING_FACTOR * rdapResultSetMaxSize)) { if (EppResourceUtils.isActive(domain, now)) {