Opened 8 days ago

Last modified 6 days ago

#19080 new bug

Query term order shouldn't matter, but does.

Reported by: humdinger Owned by: axeld
Priority: normal Milestone: Unscheduled
Component: File Systems/BFS Version: R1/beta5
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

This is hrev57849, 64bit.

The order in which you enter the terms for a query should not matter, but apparently it does. Consider these two queries that should have the same result:

  1. query -a "(((MAIL:when>%-3 days%)&&(MAIL:subject=="*[cC][oO][mM][mM][iI][tT]*"))&&(BEOS:TYPE=="text/x-email"))"

B_OK

  1. query -a "(((MAIL:subject=="*[cC][oO][mM][mM][iI][tT]*")&&(MAIL:when>%-3 days%))&&(BEOS:TYPE=="text/x-email"))"

B_NOT_OK

While query 1 results in the correct few dozens of mails from the last 3 days, query 2 returns over 3,000 mails from since forever (2019 for me, as I don't have older mails on this computer).

Not good...

Attachments (2)

works.png (11.0 KB ) - added by humdinger 8 days ago.
B_OK
doesntwork.png (11.0 KB ) - added by humdinger 8 days ago.
B_NOT_OK

Download all attachments as: .zip

Change History (6)

by humdinger, 8 days ago

Attachment: works.png added

B_OK

by humdinger, 8 days ago

Attachment: doesntwork.png added

B_NOT_OK

comment:1 by waddlesplash, 8 days ago

Component: Kits/libtracker.soFile Systems/BFS
Owner: changed from nobody to axeld

comment:2 by waddlesplash, 7 days ago

Does this reproduce on something besides BFS with emails; perhaps on packagefs?

comment:3 by humdinger, 6 days ago

With "on packagefs" you mean like the "system" volume?

There isn't much with atributes around there...
I just searched for applications with a "sk" AND "b" in their name, then tried the other way around. That did work. As did searching for audio files on a BFS volume, querying for Artist && Album combinations.

Maybe it's somethingto do with the MAIL:when attribute not being of type "string" as the MAIL:subject?

Also curious, why does query -a "(last_modified>%-1 days%)" spit out every file, not just the ones modified since yesterday? Maybe worth another ticket...

comment:4 by waddlesplash, 6 days ago

It's possible that relative date-based queries are somehow broken and that's the problem here.

Note: See TracTickets for help on using tickets.