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

ISSUE-257: Humble (and experimental) attempt at dealing with stale/missing excerpts #258

Merged
merged 5 commits into from
Mar 30, 2023

Conversation

DiegoPino
Copy link
Member

See #257

... on GET calls.
This enables a new config option for our advanced highlighter and enables a very experimental lazy loading mechanism when needed, allowing still POST calls to get around the fact that they are "barely" cached... (except at the Views level, but we don't mess with that right? :( Also this whole day could have been a cache time set to 0 .... but i like people...

To be honest, I feel this is over engineered... I understand the use case and the need and I might develop this better/further soon. I don't know if even caching this beyond time to live 0 is more performant or not

... on GET calls.
This enables a new config option for our advanced highlighter and enables a very experimental lazy loading mechanism when needed, allowing still POST calls to get around the fact that they are "barely" cached... (except at the Views level, but we don't mess with that right? :(
Also this whole day could have been a cache time set to 0 .... but i like people...
@DiegoPino DiegoPino self-assigned this Feb 21, 2023
@DiegoPino DiegoPino added this to the 1.1.0 milestone Feb 21, 2023
@DiegoPino DiegoPino added enhancement New feature or request Drupal Views JSON Integration with VIEWS Symfony Services Configuration Drupal 9 The version that comes after 8 and before 10 Typed Data and Search Future PHP8 The one that comes after 7 UI/UX Experience Search API F around and find out labels Feb 21, 2023
…nd most missing snippets

Concerned about performance tbh
This also forces $hl->setRequireFieldMatch(TRUE); to avoid highlighting things that did not match all. This is fair.

Most of this code depends on actual format_strawberry field views Filter (JOIN) one so needs to be tested together. There is more to do here but this looks clean. I could expose WAY more settings but for now we can roll with these defaults (e.g the snippets are going to be only of 128 max size

Finally i made a "if this is autocomplete" bypass highlighting.That should be by default Drupal, like really!
DiegoPino added a commit to esmero/format_strawberryfield that referenced this pull request Mar 29, 2023
…iews

This is WIP but works. Why WIP? The settings are not all the ones i need
And also i want to expose (checkboxes) if this is enabled or not

Requires esmero/strawberryfield#258
@DiegoPino
Copy link
Member Author

This requires esmero/format_strawberryfield#287 to see it in action, but won't fail if not merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Configuration Drupal Views JSON Integration with VIEWS Drupal 9 The version that comes after 8 and before 10 enhancement New feature or request Future PHP8 The one that comes after 7 Search API F around and find out Symfony Services Typed Data and Search UI/UX Experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant