NotePlan / plugins

The main NotePlan repository, which contains the source code for all NotePlan plugins. If a release entry has been created, it will be available for installation from within NotePlan application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Search Extensions: “No results found for search” - when refreshing results

inspiredearth opened this issue · comments

Checks

  • I confirm I have restarted NotePlan and this problem still persists.
  • Is this a repeatable problem?

Describe the bug
I have used the Search Extensions plugin to create a number of saved searches. saved as notes.
When I click the “Refresh Results” link that’s in those search notes, I always get “No results found for search” popping up. And the results do not refresh.

What do you expect it to do instead?
I expected the results to be refreshed. There are results to be found, as evident in the multiple existing search results, and new items that should be picked up in the refresh.

To Reproduce
Steps to reproduce the behavior:
I expect most of the steps are self-evident. Do let me know if you need more info.

In my tests, I am search for a tag (#waiting-on). I have tried using just the /quicksearch method, and also the /flexisearch method. It doesn’t appear to matter what terms I search for, or other conditions.

E.g., in my /quicksearch I simply searched for #waiting-on. It gives results as expected.
I then add a new instance of #waiting-on in my notes.
I then refresh, and it doesn’t work, as descried in this bug report.
I have also used the /flexisearch to give more complex criteria (doesn’t seem to matter what they are). Same issue occurs.

Screenshots

CleanShot 2024-06-11 at 13 53 19

System

  • Device: Mac
  • OS: macOS 14.5
  • NotePlan Version: 3.12 (1196)
  • Plugin Name & Version: Search Extensions v1.3.1

Additional context
I think that’s about it.

Plugin Console Log
To provide us with more clues about where the bug/error is occurring...

  1. Open the Plugin's Preferences by going to NotePlan's menu > Preferences > Plugins and clicking the settings "cog" icon next to the plugin in question. Scroll to the bottom and set the logging level to "DEBUG" and click "Save & Close"
  2. Now open the Plugin Console by going to Noteplan > Help > Plugin Console (not the macOS Console app).
  3. Run the plugin command you're reporting
  4. Copy the output from the Plugin Console and paste it below
  5. Delete any output that has personal information you don't want in there
Executing function 'quickSearch'
2024-06-11 14:05:52 | DEBUG | quickSearch :: starting with searchTermsArg=#waiting-on, paraTypeFilterArg=open,taskScheduled,checklist,checklistScheduled,text, noteTypesToIncludeArg=notes,calendar
2024-06-11 14:05:52 | DEBUG | jgclark.SearchExtensions v1.3.1 :: arg0 -> searchTermsArg '#waiting-on'
2024-06-11 14:05:52 | DEBUG | jgclark.SearchExtensions v1.3.1 :: - called non-interactively? true
2024-06-11 14:05:52 | DEBUG | jgclark.SearchExtensions v1.3.1 :: arg1 -> note types 'notes,calendar'
2024-06-11 14:05:52 | DEBUG | jgclark.SearchExtensions v1.3.1 :: arg2 -> originatorCommand = 'quickSearch'
2024-06-11 14:05:52 | DEBUG | jgclark.SearchExtensions v1.3.1 :: arg0 -> search terms [#waiting-on]
2024-06-11 14:05:52 | DEBUG | validateAndTypeSearchTerms :: -> [,#waiting-on,,] from [ #waiting-on ]
2024-06-11 14:05:52 | DEBUG | validateAndTypeSearchTerms :: starting with 1 normalised terms: [#waiting-on]
2024-06-11 14:05:52 | DEBUG | search/validateAndTypeSearchTerms :: Validated 1 terms -> [#waiting-on]
2024-06-11 14:05:52 | DEBUG | optimiseOrderOfSearchTerms ->  :: [0] = {
  "typeOrder": "may",
  "type": "may",
  "term": "#waiting-on",
  "termRep": "#waiting-on",
  "longestWordLength": 11
}
2024-06-11 14:05:52 | DEBUG | jgclark.SearchExtensions v1.3.1 :: arg3 -> para types 'open,taskScheduled,checklist,checklistScheduled,text'
2024-06-11 14:05:52 | DEBUG | runSearchesV2 :: Starting with 1 search term(s) and paraTypes 'open,taskScheduled,checklist,checklistScheduled,text'. (With no dates.)
2024-06-11 14:05:52 | DEBUG | runSearchesV2 ::   - searching for term [#waiting-on] type 'may':
2024-06-11 14:05:52 | DEBUG | runSearchV2 :: Starting for [#waiting-on]
2024-06-11 14:05:52 | DEBUG | runSearchV2 :: - found 0 open tasks to work from
2024-06-11 14:05:52 | DEBUG | runSearchV2 :: - Before dedupe, 0 results for '#waiting-on'
2024-06-11 14:05:52 | DEBUG | runSearchV2 :: - After dedupe, 0 results for '#waiting-on'
2024-06-11 14:05:52 | DEBUG | runSearchV2 :: - end of runSearchV2 for [#waiting-on]: 0 results from 0 notes
2024-06-11 14:05:52 | DEBUG | runSearchesV2 ::   -> 0 results for '#waiting-on' in 4ms
2024-06-11 14:05:52 | DEBUG | runSearchesV2 :: - 1 searches completed in 7ms -> 0 results
2024-06-11 14:05:52 | DEBUG | applySearchOperators :: Starting with [#waiting-on]: 0 must terms; 1 may terms; 0 not terms. Limiting to 500 results. with no dates
2024-06-11 14:05:52 | DEBUG | applySearchOperators :: - must: No results found for must-find search terms
2024-06-11 14:05:52 | DEBUG | applySearchOperators :: - may: as 0 'must' terms, we can add all for #waiting-on
2024-06-11 14:05:52 | DEBUG | applySearchOperators :: - may: No results found.
2024-06-11 14:05:52 | DEBUG | applySearchOperators :: May: at end, 0 results from 0 notes
2024-06-11 14:05:52 | DEBUG | applySearchOperators :: Not: at end, 0 results from 0 notes
2024-06-11 14:05:52 | DEBUG | runSearchesV2 :: - Applied search logic in 2ms
2024-06-11 14:05:52 | DEBUG | makeAnySyncs :: No Synced lines in result set
2024-06-11 14:05:53 | DEBUG | jgclark.SearchExtensions v1.3.1 :: destination = quick, started with originatorCommand = quickSearch
2024-06-11 14:05:53 | DEBUG | jgclark.SearchExtensions v1.3.1 :: No results found for search [#waiting-on]

Thanks for the clear report @inspiredearth. I can't try to fix it right now, as I'm in the middle of releasing something else, but I can reproduce the problem. And I can suggest a workaround, which is to reveal the x-callback URL under the 'Refresh' link, and remove the &arg2=... part.