DependencyTrack / DependencyTrack/dependency-track

Using api/v1/search/project with a term returns also approximate results

Open
#2,351 1 comment 0 reactions 0 assignees View on GitHub
api docs defect in triage
Dominant language
Java
Stars
4.2k
Forks
811
Avg merge
8h 39m
Merged PRs (30d)
237

Description

### Current Behavior

Using api/v1/search/project with a term returns also approximate results.

### Steps to Reproduce

1. Use the API to search a project ex:
`curl -X 'GET' 'DT_BACKEND_URL/api/v1/search/project?query=docker%5C-images/alpine%5C-api' -k -H 'accept: application/json' -H 'X-Api-Key:API_KEY'`

Returns a list of every project with "**docker**" or "**images**" in the name instead of the only one called "**docker-images/alpine-api**"

### Expected Behavior

It should only return the exact match

### Dependency-Track Version

4.6.x

### Dependency-Track Distribution

Container Image

### Database Server

PostgreSQL

### Database Server Version

14.5

### Browser

Mozilla Firefox

### Checklist

- [X] I have read and understand the [contributing guidelines](https://github.com/DependencyTrack/dependency-track/blob/master/CONTRIBUTING.md#filing-issues)
- [X] I have checked the [existing issues](https://github.com/DependencyTrack/dependency-track/issues) for whether this defect was already reported

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.