Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
inspiredearth opened this issue Jun 11, 2024 · 2 comments
Open
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@inspiredearth
Copy link

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]
@jgclark
Copy link
Collaborator

jgclark commented Jun 11, 2024

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.

@jgclark jgclark self-assigned this Jun 11, 2024
@jgclark jgclark added the bug Something isn't working label Jun 11, 2024
@inspiredearth
Copy link
Author

Thanks Jonathan || @jgclark . Great name.
I'll try out this workaround.
Regards ... (another) Jonathan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants