Boavizta / boaviztapi

🛠 Giving access to BOAVIZTA reference data and methodologies trough a RESTful API
GNU Affero General Public License v3.0
68 stars 23 forks source link

Retrieve component data from strict to fuzzy index matching #75

Closed da-ekchajzer closed 2 years ago

da-ekchajzer commented 2 years ago

Problem

When user send a configuration, the way they write strings can vary a little (case, space, …). Strings are often used as an index. If we want the user to have some flexibility, index matching should be non-strict (fuzzy).

Example

Skylake is a cpu family

Request :

"cpu":{
    "core_units":8,
    "cpu_family":"Skylake"
}

But it could be written in different ways : skylake, Skylak, sky lake . We need all of those to match Skylake index.

Solution

Replace strict string matching to fuzzy matching in boaviztapi/model/component for CPU, RAM and SSD in smart_complete.

da-ekchajzer commented 2 years ago

Implemented for CPU family, RAM manufacturer and SSD manufacturer in https://github.com/Boavizta/boaviztapi/pull/113