Search changed from "and" function to "or" function (or even broken?) in KiCad-Nightly

I answer more forum questions then I make KiCad projects and am now experimenting with KiCad-Nightly V8.0.0~rc2. A difference I noticed is that search functions have changed from an “and” function to an “or” function.

Some examples:

  1. In the schematic editor, press a to add a symbol, then search for: conn 02 07 (with spaces) to search for connector symbols 2 rows of pins and 7 pins per row. KiCad V7.0.10 finds about 16 symbols, while in KiCad-nightly you get overwhelmed by almost? every symbol in the library.
  2. Schematic Editor: Add a symbol and search for resistor light V7 finds light dependent resistors / photoresistors, while KiCad-nightly lists hundredths of search results.
  3. In the Footprint Editor a search for" resistor 0603 finds 11 footprints in KiCad V7.0.10 while in KiCad-Nightly it finds many footprints. I am not sure what it is searching for. Is the search just broken?

It is a change I do not like at all. I am not even sure if it is intended. If it were up to me, I would turn it back (or maybe make it configurable?)

Is it a bug or a feature?

2 Likes

According to the programmer this is a feature: symbol chooser: filter field combines filter results together (#16046) · Issues · KiCad / KiCad Source Code / kicad · GitLab

I’m with you that this new implementation is nearly useless, at least with my way I have always used the filter field (that was: type one phrase after the other and see the search result list shrinking).

2 Likes

So in theory results that match both words should be at the top of the list. Its not strictly just OR

No, not really. Results are also sorted by library, I guess each library is only listed once.

For schematic symbols a search for conne 02x05 in KiCad V7 gives a short list of 19 different connector symbols with a 2x5 pin configuration:

The same search in KiCad-Nightly lists a few thousand symbols. It first lists (nearly?) all symbols in the “Connector” library, and then, a few pages lower it lists (nearly?) all connectors in the “Connector_Generic” library and so forth. It makes it difficult to narrow down a search, because when you add a search term, it just shows more results.

When I do a search for resistor axial P20 in the footprint editor, then indeed it does show an axial resistor with a pitch of 20(something) mm as the first result. but it also shows axial capacitors, axial inductors, and even some 100+ diodes just because they have the word “axial” somewhere in the description or in their keywords fields.

In general, when I add keywords to the search box, I expect to get fewer results, but KiCad-Nightly returns more results, and you have to wade through the list manually in an attempt to find something useful. If you get too few or only a few wrong results, then it’s easy to try some other search term, but if you have to wade though thousands of vague search results

Here yet another example, from the footprint chooser:

And for comparison, a similar search in Kicad V7 (Which lists the libraries separate (Which I also find sub-optimal)):

Yet another example, when I search for qfn-20 thermal then first some 100 footprints with “thermal” pads are shown before even the first qfn-20 footprint is in the search results. While when the search is only for qfn-20, then there are around 50 to 80 results and about half of them have thermal pads.

I agree that this is wrong behaviour and in my opinion full matches should always list at the top, whichever library they are in. Please raise an issue showing these examples

Hello,

The ticket mentions also:

(Note that you have to have “Sort by Best Match” chosen to use the scoring algorithm.)

Is that something you accounted for here?
(I honestly don’t know how to set that sort method, just trying to understand the issue before v8 gets out and I hear coworkers latching at it :D)

sort by best macth / sort alphabetically is set with the small icon to the right of the filter field.
Helps a little bit.
But the filter is still not as useful as in v7.

If there are enough complaints in the forum (this thread) we could try to open a new ticket - maybe the change gets reverted to the old filter behaviour (someone other should open the issue - as noted my report was already closed).

That definitely sounds like a step back in filtering, makes it pretty much useless imo. A better way would be to use some special identifiers like | instead of a space to OR the different words if wanted while sticking to space meaning AND.

2 Likes

+1+1+1+1+1+20characters

It did take a while but I just created an issue on gitlab for it:

Just to be clear, while I provided the info about the original design, I am not the one who wrote this. I don’t like the algorithm either (and it’s been a nightmare to maintain).

In my opinion this “OR” of all word in search filed behavior is counterproductive in most use case scenarios.
When i’m searching for a symbol i want to narrow down the list of results. The best case would be if i see only one result because that probably exactly what i want.

Such logic make sense on the supplier website, when I’m looking for a part that will fit my needs and want to see as much available options on the market as possible, but when I’m drawing schematic I already know what i had chosen.

3 Likes

It seems to be a trend in many applications and on websites that someone once upon a time thought, that a fuzzy search with hundreds of completely unrelated results is somehow more useful than an honest “No results” or just the one you are looking for. And I agree totally that the part search should be not like this at all.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.