Skip to content
New issue

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

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

Already on GitHub? # to your account

Bugfix, Canvas and Mindmap content didn´t show in search #720

Merged
merged 1 commit into from
Dec 8, 2024

Conversation

CobriMediaJulien
Copy link
Contributor

Fix for #669

@CobriMediaJulien CobriMediaJulien changed the title Bugfix, Canvas and Mindmap content doesnt show in wuick search and fu… Bugfix, Canvas and Mindmap content didn´t show in search Dec 7, 2024
Copy link
Contributor

@eliandoran eliandoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CobriMediaJulien , the search is not perfect but it's a good starting point.

More specifically, it doesn't do a text search but a full content search. In the context of both the mindmap and canvas notes, the content is a JSON, so if you search for the keys inside the JSON they will be found (e.g. try searching for nodeData to get a list of all the mind maps). This can cause false positives when searching for some very generic texts.

@zadam already solved this issue, but for HTML files in note_content_fulltext.ts, look for the preprocessContent method. Most likely we would have to define some kind of filter to only take user data (or at the very least JSON values instead of also keys).

@CobriMediaJulien
Copy link
Contributor Author

I could implement a filter e.g. :

Canvasfilter:
.elements
| filter(.type == "text")
| pick(.text)

mindmapfilter:
.nodeData
| pick(.topic)

image

then the only key present to compare in fulltextsearch is text: "some default text". your thougts?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants