Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to RDAP RIR-Search (Basic Searches) Feature #1611

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

MiguelAHM
Copy link
Contributor

@MiguelAHM MiguelAHM commented Dec 17, 2024

This PR contains some fixes for the RDAP RIR-Search (Basic Searches) feature, including:

  • The ips?handle search input should match against the handle field and not the name field of the object.
    • The handle in IPs should match the handle in the RDAP output.
  • Do not add an implicit trailing * (i.e. match all) to the ips?handle search.
    • Perform an exact match search in IP searches.
    • The user can add a trailing * themselves if they wish.
  • Do not add an implicit trailing * (i.e. match all) to the autnums?handle search.
    • Perform an exact match search in autnum searches.
  • Return an empty value in the search response if no match is found. Do not return a 404.
  • Make searches case insensitive.

@eshryane
Copy link
Member

FYI I tested wildcard search with a term that will match a lot of objects (i.e. every inet6num primary key) and the response was returned quickly and limited correctly to 100 results.

$ curl -o file -v "http://localhost:1080/rdap/ips?handle=2001*"
$ fgrep '"handle"' file | grep "2001" | wc -l
100

.type(MultiMatchQueryBuilder.Type.PHRASE_PREFIX)
.operator(Operator.AND);
private QueryBuilder getQueryBuilder(final String[] fields, final String term, final boolean matchExact) {
if (hasWildCard()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MatcExact and hasWildcard seems to be contradictory. if hasWildCard() then createWildCardQuery() else exact match?

@eshryane eshryane changed the title RDAP Search - Basic Fixes Fixes to RDAP RIR-Search (Basic Searches) Feature Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants