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

wildcards do not work as expected for all fields #210

Closed
plawton-umd opened this issue Jul 29, 2022 · 6 comments · Fixed by #218
Closed

wildcards do not work as expected for all fields #210

plawton-umd opened this issue Jul 29, 2022 · 6 comments · Fixed by #218
Assignees
Labels
B13.0 bug Something isn't working s.medium

Comments

@plawton-umd
Copy link

🐛 Describe the bug

Working from https://nasa-pds.github.io/pds-api/guides/search/endpoints.html
The wildcard, specifically "*", behaves inconsistently. It works for title and description.
For examples

curl --get 'https://pds.nasa.gov/api/search-sbnumd/1.0/collections' --data-urlencode "summary-only=true" --data-urlencode 'q=(title eq "Tempel")'

and

curl --get 'https://pds.nasa.gov/api/search-sbnumd/1.0/collections' --data-urlencode "summary-only=true" --data-urlencode 'q=(description eq "Tempel")'

It does not work for many other field tried - for example name and target.

📜 To Reproduce

Steps to reproduce the behavior:

curl --get 'https://pds.nasa.gov/api/search-sbnumd/1.0/collections' --data-urlencode "summary-only=true" --data-urlencode 'q=(name eq "Tempel")' | json_pp
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 109 0 109 0 0 1079 0 --:--:-- --:--:-- --:--:-- 1079
{
"summary" : {
"hits" : 0,
"limit" : 100,
"properties" : [],
"q" : "(name eq "Tempel")",
"sort" : [],
"start" : 0,
"took" : 20
}
}

Note the 0 hits.

🕵️ Expected behavior

Expect a result similar to that of title and description.

{
"summary" : {
"hits" : 6,
"limit" : 100,
"properties" : [
"_package_id",
"description",
"lid",
...
],
"q" : "(description eq "Tempel")",
"sort" : [],
"start" : 0,
"took" : 318
}
}

Note 6 hits.

📚 Version of Software Used

curl --get 'https://pds.nasa.gov/api/search-sbnumd/1.0/

🩺 Test Data / Additional context

🏞Screenshots

🖥 System Info

  • OS: Mac 11.4
  • Browser n/a (terminal window)
  • Version n/a
  • curl 7.64.1 (x86_64-apple-darwin20.0) libcurl/7.64.1 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.41.0
    Release-Date: 2019-03-27

🦄 Related requirements

⚙️ Engineering Details

@plawton-umd plawton-umd added bug Something isn't working needs:triage labels Jul 29, 2022
@plawton-umd plawton-umd changed the title <system feature> <is not/does not> <expected behaviour> wildcards do not work as expected for all fields Jul 29, 2022
@jordanpadams
Copy link
Member

@plawton-umd this is probably the OpenSearch types we are using to ingest and tokenize the data. will research this further.

@jordanpadams
Copy link
Member

@plawton-umd as an additional note, it actually looks like eq and like are not working properly. q=(description eq "Tempel")' should actually only match and exact match where the description == Tempel. we fixed this here: NASA-PDS/registry-api#158 . and have another ticket to address a more fuzzy search using like here: NASA-PDS/registry-api#159

@al-niessner
Copy link
Contributor

@jordanpadams what needs done to this ticket? You mentioned about that it already fixed and documentation is waiting to be updated.

@jordanpadams
Copy link
Member

jordanpadams commented Sep 28, 2022

@al-niessner if you could fix the documentation to make q vs like more clear, that would be great

@al-niessner
Copy link
Contributor

@jordanpadams @jimmie - where is the documentation that needs fixed as I have never seen it but only discussed it in the abstract?

jordanpadams pushed a commit that referenced this issue Sep 28, 2022
* Update response_formats.rst

fix typo on kvp

* Update endpoints.rst

Change wildcarding rules

resolves #210
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B13.0 bug Something isn't working s.medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants