• How to use search --subject=ARG ?

    By Alan Jacobs1 7 years ago

    Hi,
    How do you use the search option with the –subject=arg option? I can't seem to get it to work with any version ( 5.0.6, 5.2.1, 5.2.2 )

    I'm trying to get a list of emails from a certain user with a certain subject from the Inbox.

    clenotes –password=xxxxxxxx search –from=“someone@acme.com” –folder=inbox seems to work ok. But if I try and narrow the search I get the exactly the same results ( ie the subject isn't being used )
    clenotes –password=xxxxx search –from=“someone@acme.com” –subject=“some text” –folder=inbox

    and just using the subject fails to match anything even though the subject is present.
    clenotes –password=xxxx search –subject=“some text” –folder=inbox

    Am I confused over how to search or is there a bug here?

    • By Sami Salkosuo 7 years ago

      Not a bug, but more like a design flaw. I hadn't even implemented it to use –from and –subject together.

      I've uploaded new version 5.2.3 and now you should be able to search using both –from and –subject.

      • By Alan Jacobs1 7 years ago

        Wow thanks again for the quick response! I've downloaded the new version, but unfortunately it seems to behave exactly the same as before.

        I think I have 2 problems here.

        Firstly the search –subject=ARG just doesn't work as I'd expect, when used on its own.

        I have a number of test messages with subjects of Test1, Test2 …..
        If I use clenotes –password=xxxx search –subject=Test1 it finds no matches.
        But if I use clenotes –password=xxxx search –subject=test then it does match some other messages that had test in their subject. e.g. “New robot - beta testing” but not any of the “Testx” messages.

        I've tried a variety of single or double or no quotes but can never match my Testx messages. ( But if I search just on –from=ARG, then they are matched )

        My second problem is how to restrict the search just to the Inbox?
        Using clenotes –password=xxxx search –from=“me@me.com” –folder=Inbox ( Tried many combinations of capitalisation and quotes etc for Inbox ) This returns matches from the whole database and not just restricted to the Inbox.

        Similarly using the search –subject=test also returns matches from outside the Inbox folder.

        • By Sami Salkosuo 7 years ago

          Are your test emails from your own Notes-client, sent using your ID that you are using with CLENotes?
          Because now when searching by subject, I don't include mails sent by self.

          I investigated about searching from folder and it appears that Notes, by default, does not track folder references for documents. It needs to be enabled programmatically and that may not be enough. There are a few support documents about this:

          • http://www-01.ibm.com/support/docview.wss?uid=swg21209890
          • http://www-01.ibm.com/support/docview.wss?rs=475&uid=swg21201309
          • http://www-01.ibm.com/support/docview.wss?rs=463&uid=swg21092899

          I investigate this further.

          • By Alan Jacobs1 7 years ago

            Yes I was using my own ID. I've now sent some tests from an alternative ID but I still get the same inconsistent results.

            Actually any searches using the subject seem to be inconsistent. Some messages are found others ignored. I can see no pattern at the moment.

            So I have now gone back to using a mail rule to move matching subjects into a folder where I can then use the clenotes list option to retrieve them. Not ideal but it works.

            • By Sami Salkosuo 7 years ago

              I use Notes Formula to search mails. Currently formula to search mails using subject is: @Contains(Subject;“subject”) & !@Contains(From;“currentuserid”)

              You could try to use –formula option to search. For example to match all subjects containing “test” (ignoring case), clenotes command would be:
              clenotes.cmd search –formula=“@Contains(@LowerCase(Subject);"test")”

    • By Sami Salkosuo 7 years ago

      I uploaded new version 5.3 that should have better support for folders. –folder is now global option and it's supported in list, search and today commands.

      As I mentioned earlier, folders in Notes are not enabled by default.
      In order to use folders, folder references need to be enabled.

      Enable folder references using this command:
      clenotes.cmd dev –folderrefs –enable

      This enables folder tracking for all future documents. Folders are not tracked in existing documents unless this command is executed:
      clenotes.cmd dev –folderrefs –putallinfolder

      After enabling folder references, folders can be used to set folder for commands. For example, following example searches all mails with subject 'January' from 'project'-folder:
      clenotes.cmd –folder=project search –subject=January