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

Better Canvas search to prevent metadata beeing searched in fulltext | Code formatted #726

Closed

Conversation

CobriMediaJulien
Copy link
Contributor

For reference:
#720

@eliandoran
Could you pls check the code if the quality regarding variable names is okay? I just hacked it together. It kinda works well enough. i don´t have anymore time this week.

Now it searches only the text or topic of the notes.

Comment on lines 137 to 139
let mindMapcontent = JSON.parse (content);
let topic = mindMapcontent.nodedata.topic;
content = utils.normalize(topic.toString());
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't seem to go through all the nodes in order to search for content.
I added a text node randomly inside the tree and I couldn't find it.
Having the text in a canvas note instead appears to work fine.

Copy link
Contributor Author

@CobriMediaJulien CobriMediaJulien Dec 9, 2024

Choose a reason for hiding this comment

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

Do you have further information?

I tried the same and it does work in my case. It does find the whole searched text in the textnote. Random Text note inside my tree:

image

working with mindmap, too. I cant reproduce your behaviour:

image

but could be sth with the backendcache thats created when searched. if you have a really big database. I can´t check if zadam loads every note in the cache regardless the size of the database.

Copy link
Contributor

@eliandoran eliandoran Dec 10, 2024

Choose a reason for hiding this comment

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

@CobriMediaJulien , for the mind map you would need to add more nodes. From what I see in the screenshot it's only a single node ("now a mindmaptest"). Try pressing enter a few times to create a few subnodes and search for that subnode instead.

I believe you need to iterate recursively through all the nodes, similarly to how you do for canvas note.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could reproduce. I just search for topic value and not children. I will fix it this weekend.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed and commited to this PR

Copy link
Contributor

Choose a reason for hiding this comment

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

@CobriMediaJulien , don't forget to remove the draft status from the PR once the required changes were done.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this PR provides also a fix for:

#772

@eliandoran eliandoran marked this pull request as draft December 9, 2024 21:24
Mindmap search works now
@CobriMediaJulien CobriMediaJulien marked this pull request as ready for review December 13, 2024 16:05
# 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