Project

General

Profile

Actions

Bug #21625

closed

Host search using OR on facts finds duplicate records and takes a long time

Added by Marek Hulán about 7 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Search
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1511254

Description of problem:

AND and OR operation is not working on satellite as expected, when trying to filtering host with single filter like “facts.bios_vendor = SeaBIOS” it works fine, but when your try to filter using AND and OR operator its not working as expected, when filtering using AND it gives zero result “facts.bios_vendor = SeaBIOS and facts.architecture = x86_64”, when trying to filter using OR result is unstable as it gives around 1700 number of results even through there is only 10 machines registered with satellite.

How reproducible:
- Under Satellite UI - > Hosts → All Hosts → in search tab
- Try to filter host using any fact ex. “facts.bios_vendor = SeaBIOS”
- Also try to filter using any other fact ex. “facts.architecture = x86_64”
- Now combine search filter using AND and OR operator like below and check the result.
Ex. “facts.bios_vendor = SeaBIOS and facts.architecture = x86_64”
Ex. “facts.bios_vendor = SeaBIOS or facts.architecture = x86_64”

Actual results:
- Observe there is no result when using AND operator
- Observe there is N number of results when using OR operator which is regardless of number of registered clients.

Expected results:
- Should be able to search hosts using AND and OR

Additional info:
Also tried to search using the query structure given on the link “https://github.com/wvanbergen/scoped_search/wiki/Query-language” but still result is not as expected.

Actions

Also available in: Atom PDF