Skip to content

Advanced search: partial/prefix version search returns incomplete results (e.g. 2.5 doesn't match 2.5.1) #4378

Description

@Farooq-Fateh-Aftab

Description

Advanced search does not support partial/prefix matching on a project version. When a user enters a partial version (e.g. 2.5) in the advanced search, the value is treated as an exact term, so releases whose version merely starts with the entered value (e.g. 2.5, 2.5.1, 2.5.x) are not returned. Only an exact version match works.

How to reproduce

  1. Have projects with versions such as 2.5, 2.5.1, 2.5.10.
  2. Open the advanced search and enter 2.5 in the Version field.
  3. Run the search.

Expected: all items whose version starts with 2.5 are returned (2.5, 2.5.1, 2.5.10, ...).

Actual: the search matches only the exact value and returns incomplete results (e.g. only an exact 2.5), because the version field is queried as a plain term instead of a wildcard/prefix query.

Screenshots ( if applicable )

Add screenshots to help explain your problem.

Versions

  • Docker version OR
  • Last commit id on main

SW360 logs

  • With docker through docker logs sw360
  • From bare metal / vm install system under /var/log/sw360/sw360.log and /var/log/tomcat/error.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions