ES -sort-path when combined with distinct: returns incorrect (a subset of) results

Found a bug in "Everything"? report it here
Post Reply
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

ES -sort-path when combined with distinct: returns incorrect (a subset of) results

Post by therube »

ES -sort-path when combined with distinct: returns incorrect (a subset of) results


i have no idea /what/ results are being chosen, though they are part of the expected results?


appears distinct: (when used with -s) is not distinct-ing, as in you may get the same
file name, differing only by path (&/or drive letter if that happens to be the case) &
only a subset of results at that?


(only relevant parts below are -s & distinct:, the rest of the options are immaterial)

Code: Select all

C:\out>es.ex2 joan baez  file: -instance 15 -p distinct:            | wc
     73     721    5785

C:\out>es.ex2 joan baez  file: -instance 15 -p distinct: -s         | wc
     24     255    2039

C:\out>es.ex2 joan baez  file: -instance 15 -p distinct: -sort path | wc
     24     255    2039

C:\out>es.ex2 joan baez  file: -instance 15 -p distinct:    | sort  | wc
     73     721    5785
last example shows it can easily be worked around (using external sort), but...


1.1.0.26, .1354a
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: ES -sort-path when combined with distinct: returns incorrect (a subset of) results

Post by void »

If a property is not specified with distinct: it will use the properties specified in sort:

Please try the following search:

es.ex2 joan baez file: -instance 15 -p distinct:name -sort path

distinct:



I will look into making distinct: with no properties specified to always find distinct names.
Currently dupe: is doing this for backwards compatibility.
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: ES -sort-path when combined with distinct: returns incorrect (a subset of) results

Post by void »

Everything 1.5.0.1355a changes distinct: and unique:

distinct: without any properties specified will now find distinct names.
Same with unique:



Previously, distinct: and unique: without any specified properties would use the properties from the current sort.
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: ES -sort-path when combined with distinct: returns incorrect (a subset of) results

Post by therube »

1354:

Ah, never even considered that.

And yes, distinct:name works.
Post Reply