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

Expand search: text in description #511

Open
tarnung opened this issue Oct 16, 2020 · 3 comments
Open

Expand search: text in description #511

tarnung opened this issue Oct 16, 2020 · 3 comments

Comments

@tarnung
Copy link
Collaborator

@tarnung tarnung commented Oct 16, 2020

Continuation of the discussion in #504

Should descriptions only be searched when explicitly queried with a search term like desc: like for timestamps or should their text be a part of regular word search?

Should the raw description be used for search or should only certain parts ( as in header.get('description').filter(d=>d.get('type')==='text')) be used?

@munen
Copy link
Collaborator

@munen munen commented Oct 16, 2020

Thanks for already tackling the next issue^^

Should descriptions only be searched when explicitly queried with a search term like desc: like for timestamps or should their text be a part of regular word search?

The former.

Should the raw description be used for search or should only certain parts ( as in header.get('description').filter(d=>d.get('type')==='text')) be used?

The latter.

Loading

@schoettl
Copy link
Collaborator

@schoettl schoettl commented Oct 16, 2020

Should the raw description be used for search or should only certain parts ( as in header.get('description').filter(d=>d.get('type')==='text')) be used?

The latter.

Are you sure @munen? E.g. *bold* would not be found then – which is arguably OK.

But what is with this query:

desc:"two words"

when the actual text is two *words*?

IMO it would be best to match header.get('descriptionAsPlainText') or just header.get('rawDescription')... the first doesn't exist though.

Loading

@munen
Copy link
Collaborator

@munen munen commented Oct 16, 2020

Are you sure @munen?

Apologies. I had some memory of rawDescription including all the other metadata (like
PROPERTIES and planning items) which is just a wrong memory:

image

With the current data we have, searching in rawDescription is likely the best. To get around the markup issue you mentioned, we could exclude the common markup (‘bold’, ‘/italic/’, ‘underlined’, ‘=verbatim=’ and ‘code’, ‘+strike-through+’.) in search.

Quick'n'dirty POC:

munen@lambda:~% node
> 'two *words*'.replace(/\*([\w]*)\*/, (match, p1, offset, string) => p1).match(/two words/)
[ 'two words', index: 0, input: 'two words', groups: undefined ]

Thank you for double checking on me, @schoettl!

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants