Bug #25897
closedUsing search query for listing content hosts produces unexpected output
Description
While trying to use the search query with 'or' option to list two content hosts with FQDN, the result is long duplicated list of host entries.
The search query is: facts.network::hostname = "host_1" or facts.network::hostname = "host_2"
The result of each part of the search is as follow:
facts.network::hostname = "host_1" - returns only one record
facts.network::hostname = "host_2" - returns no record (no matches)
The combined query produces a duplicated list of 20 records of host_1.
curl -k -u admin:123456 "https://katello.example.com/api/v2/hosts?search=facts.network::hostname=host_1.example.com%20or%20facts.network::hostname=host_2.example.com&format=json"
{
"total": 3,
"subtotal": 20,
"page": 1,
"per_page": 20,
"search": "facts.network::hostname=host_1.example.com or facts.network::hostname=host_2.example.com",
"sort": {
"by": null,
"order": null
},
"results": [{...}]
}
Updated by John Mitsch about 6 years ago
- Target version set to Katello Backlog
- Triaged changed from No to Yes
we can look into this, it may be a issue in foreman rather than katello but we will double check before re-assigning
Updated by Partha Aji over 5 years ago
- Project changed from Katello to Foreman
- Category changed from API to API
- Assignee set to Partha Aji
- Target version deleted (
Katello Backlog)
Updated by The Foreman Bot over 5 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/6777 added
Updated by Partha Aji over 5 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset f8da6705dd2b508fa9042f42521754cd19992a05.