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 over 6 years ago
- Target version set to Katello Backlog
- Triaged changed from No to Yes
Updated by Partha Aji almost 6 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 almost 6 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/6777 added