You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the feature
Morph-Types have leading and trailing tokens that make an entry's morph type more visible.
E.g. The headword of a prefix should typically end with a dash.
In FieldWorks
The tokens:
are not part of either the lexeme form or the citation form. They are only part of the "calculated" headword.
are only applied to the headword if there is no Citation form. I.e. a Citation form overrides those tokens:
Filtering:
The basic search dialog seems to just strip the tokens off of the entered query and ignores them.
That can be seen here where the dialog is showing the search results of "=test" and complains when I enter a "-" on the end, which is a token, but results in an invalid combination:
Filtering on the headword column respects the tokens, but doesn't validate them (like the dialog is doing). I.e. it seems to do a simple string comparison:
Although sorting and homograph number grouping is based on headwords without morph-tokens, if an entry has a citation form and the user has manually added morph-tokens to the citation form, those morph-tokens do affect sorting and homograph grouping. I assume that's an intentional discrepancy, because it's not essential.
FieldWorks Lite
API payload
Does not need to include calculated headwords with morph-tokens
The UI needs to know how to calculate headwords as well, so we don't need to round-trip through the API in order to update the UI
We could include headwords for the benefit of third-party callers / just for fun 🤷 (I was going down this path, but it touched SO many tests, so I ditched it - YAGNI)
Filtering:
How FieldWorks' default search dialog strips morph-tokens feels quirky to me.
For starters I'd say we strictly respect/include any morph-tokens the user filters by.
Persisted headwords:
We already have calculated headwords in the FTS table. Those should be updated to include morph-tokens
Sort of in preparation for custom-views (which could exclude the primary vernacular WS) I see no reason not to include all WSs in the headword column (space-separated like lexeme-form and citation-form)
I think that we might be able to calculate headwords on the fly outside of FTS, because we have more powerful JSON features there. So, I think we should try hard to avoid persisting headwords in the Entry table
Describe the feature
Morph-Types have leading and trailing tokens that make an entry's morph type more visible.
E.g. The headword of a prefix should typically end with a dash.
In FieldWorks
The tokens:
Filtering:
That can be seen here where the dialog is showing the search results of "=test" and complains when I enter a "-" on the end, which is a token, but results in an invalid combination:
Sorting:
CitationForm ?? LexemeForm (without morph-tokens)MorphType.SecondaryOrderCitation form quirks:
FieldWorks Lite
API payload
Filtering:
Persisted headwords: