mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Order RDAP domain searches by TLD in domain name order
I am not happy that another index is required, but the Pantheon console shows that domain indexes are much smaller than the other indexes (because there are fewer domains), so it's not adding an appreciable amount of storage space. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=173561771
This commit is contained in:
parent
4a5b9fc288
commit
74873f90c8
3 changed files with 35 additions and 7 deletions
|
@ -238,12 +238,18 @@ public class RdapDomainSearchAction extends RdapActionBase {
|
|||
|
||||
/** Searches for domains by domain name with a TLD suffix. */
|
||||
private RdapSearchResults searchByDomainNameByTld(String tld, DateTime now) {
|
||||
// Since we aren't searching on fullyQualifiedDomainName, we can perform our one allowed
|
||||
// inequality query on deletion time.
|
||||
// Even though we are not searching on fullyQualifiedDomainName, we want the results to come
|
||||
// back ordered by name, so we are still in the same boat as
|
||||
// searchByDomainNameWithInitialString, unable to perform an inequality query on deletion time.
|
||||
// Don't use queryItems, because it doesn't handle pending deletes.
|
||||
Query<DomainResource> query =
|
||||
queryItems(
|
||||
DomainResource.class, "tld", tld, shouldIncludeDeleted(), rdapResultSetMaxSize + 1);
|
||||
return makeSearchResults(getMatchingResources(query, shouldIncludeDeleted(), now), now);
|
||||
ofy()
|
||||
.load()
|
||||
.type(DomainResource.class)
|
||||
.filter("tld", tld)
|
||||
.order("fullyQualifiedDomainName")
|
||||
.limit(RESULT_SET_SIZE_SCALING_FACTOR * rdapResultSetMaxSize);
|
||||
return makeSearchResults(getMatchingResources(query, true, now), now);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue