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
I noticed that if I search for two words, the search_snippets array is populated only when the item found contains both words (even if they aren't on the same line). However, if the search result contains only one of the searched words, the search_snippets array remains empty.
I'm using the the native local driver, not algolia.
Is this some kind of limitation, a bug, or could I be missing some configuration parameters in the indexes?
Thanks!
How to reproduce
Simply create an index, for example my pages below, on the collection of static pages, and then run a search using two or more words to find (choosing them knowing that only one is present on a specific target page).
and by removing the check on $j, the search_snippets now correctly include matches that have only one searched item.
Does that make sense? It seems strange to me that no one else has encountered this issue before.
Hi @ryanmitchell, yes it seems working in this way. 👍
Let's way that someone of the admins check it as well, and let's hope a fix will be released soon.
Bug description
I noticed that if I search for two words, the search_snippets array is populated only when the item found contains both words (even if they aren't on the same line). However, if the search result contains only one of the searched words, the search_snippets array remains empty.
I'm using the the native local driver, not algolia.
Is this some kind of limitation, a bug, or could I be missing some configuration parameters in the indexes?
Thanks!
How to reproduce
Simply create an index, for example my pages below, on the collection of static pages, and then run a search using two or more words to find (choosing them knowing that only one is present on a specific target page).
'pages' => [ 'driver' => 'local', 'searchables' => 'collection:*', 'fields' => ['title','main_body','description_block'], ],
Then dump the results and look into the structure, checking the search_snippets array, you will find an empty one.
Logs
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
The text was updated successfully, but these errors were encountered: