Cropping: Cropping several parts #350
Replies: 3 comments
-
We could also propose a mode that is based on the density of the terms found to keep the best crop, see this issue: meilisearch/meilisearch#1912 |
Beta Was this translation helpful? Give feedback.
-
The next iteration of cropping favors a single cropped part but is selected according to the density against the query terms found to make it more helpful for readers by choosing the most relevant part. |
Beta Was this translation helpful? Give feedback.
-
Following the v0.28 release, this discussion is now locked. We encourage you to create a new thread if needed. Thank you ✨ |
Beta Was this translation helpful? Give feedback.
-
Today, if a field has to be cropped, the engine stops at the first possible crop. This is not ideal, especially to show the interesting parts of a document from the end user's query.
For example, a document ends with
Currently I'm trying to get nice visuals.
and there is the termvisuals
higher up in this field.If the user searches for
get nice visual
in the search bar, this is what the cropper will render in the_formatted
object:loremipsum visual loremipsum
when it would be more useful to try to display all possible cropped parts for visual comfort/reading information and relevance:
...loremipsum visual loremipsum... ...nice visuals.
Depending on the
cropLength
value, several crops could automatically be merged into one if they collide.We could also propose a mode that is based on the density of the terms found to keep the best crop.
Beta Was this translation helpful? Give feedback.
All reactions