Bug 2224010 - Inconsistency in quoted field name interpretation
Summary: Inconsistency in quoted field name interpretation
Keywords:
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Search
Version: 6.14.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-19 14:45 UTC by Lukáš Hellebrandt
Modified: 2023-07-20 14:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-19074 0 None None None 2023-07-20 14:37:39 UTC

Description Lukáš Hellebrandt 2023-07-19 14:45:10 UTC
Description of problem:
Sometimes, quoted string (consisting of some field's name) is interpreted as a field's bool value. Sometimes, it's not. For example, "snippet" translates to "all entries where snipped field is set to true", BUT "!snippet" translates to "all entries where some field contains string '!snippet'". This is inconsistent.

Version-Release number of selected component (if applicable):
Sat 6.14, behavior allowed by fixing bug 1949960.

How reproducible:
Deterministic

Steps to Reproduce:
Searching in Hosts -> Provisioning templates:
0) snippet => all snippets
1) !snippet => all non-snippets
2) "snippet" => somewhat counter-intuitively all snippets but I could let this pass
3) "!snippet" => nothing, only would return whatever contains "!snippet" in its content - this is inconsistent with 2) where "snippet" is interpreted as "value of 'snippet' field is true"
4) name ~ snippet => all templates that contain "snippet" in their content
5) default => snippets with "default" in their content
6) default_template => templates marked as default
7) "default" => same as 5)
8) "default_template" => same as 6)
9) default_template = true => same as 7)
10) "!default_template" => nothing, again inconsistently with 8), the same issue as with 3)

Actual results:
2) and 3), 10) and 8) are inconsistent.

Expected results:
Both should be either translated to "field's bool value is true/false " or "string contained in fields" (IMO preferrably, since quotes are used).

Additional info:
According to aruzicka, this is an issue in scoped_search. The bug manifests in our product, though, and we even have Search component so I'm reporting it here.


Note You need to log in before you can comment on or make changes to this bug.