https://bugs.freedesktop.org/show_bug.cgi?id=64177

--- Comment #4 from Patrick Ohly <[email protected]> ---
[Please ignore the previous comment.]

(In reply to comment #2)
> This new extended searching criteria are ok.
> Just one note regarded:
>       -   "is not possible to define searches where
>            the *same* value must meet different criteria"
> This meas that a query like this is not allowed?
> 
>   [ 'or',
>     [ 'and',
>       [ 'begins_with', 'structured-name/given' , 'a' ],
>       [ 'begins_with', 'structured-name/family', 'b' ]
>     ],
>     [ 'and',
>       [ 'begins_with', 'structured-name/given' , 'b' ],
>       [ 'begins_with', 'structured-name/family', 'a' ]
>     ]
>   ]
>

That query itself is fine and will be supported. It works as intended because
there is only one structured-name.

The comment was about value lists, like telephone numbers. For example, suppose
you have two telephone numbers in the same contact:
TEL:1234
TEL:5678

Now you search
['and',
  ['contains', 'phones/value', '1'],
  ['contains', 'phones/value', '5']
]

This will match the contact, because each of the terms combined with 'and' has
a match in the contact: the first term will match '1234' and the second '5678'.
This follows from the strict mathematic definition of the operations, but is
admittedly not immediately obvious.

I think it is a corner case. It occurred to me when documenting the semantic
and I wanted to write it down. Obviously, better documentation would not have
triggered a question ;-} Please suggest a better wording.

Sort status update - recursive queries and "or"/"and" are working.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Syncevolution-issues mailing list
[email protected]
https://lists.syncevolution.org/mailman/listinfo/syncevolution-issues

Reply via email to