o19s / splainer

Elasticsearch/Solr Sandbox for exploring explain information and tweaking
http://splainer.io
Apache License 2.0
135 stars 32 forks source link

Figured out why TMDB text_people comes back as "john,sally,bob" instead of "john, sally, bob" #84

Closed epugh closed 3 years ago

epugh commented 4 years ago

snip = escapeHtml(subFieldValue.slice(0, 200)); It takes our Array and smashes it into a string.

I wonder why we do this snip? It's a method of getHighlightSnippet(), which I think we are trying to get away from. Lets not do highlighting unless I specified I wanted it to be highlighted!

Is this related to the // TODO: In a future refactor just compute the snippets and store them out, don't use a function call in the template comment in docRow.js?

worleydl commented 4 years ago

When escapeHtml is passed an array it casts it to a String which JS by default inserts commas between the elements. There may be some renaming todo, getHighlightSnippet just checks to see if there is highlighting but if not it returns the default. Most everything goes thru this function whether highlighting is turned on or not.

To get spaces between the elements we'd need to update this method: https://github.com/o19s/splainer-search/blob/master/services/normalDocSvc.js#L20

On Thu, Oct 8, 2020 at 1:39 PM Eric Pugh notifications@github.com wrote:

snip = escapeHtml(subFieldValue.slice(0, 200)); It takes our Array and smashes it into a string.

I wonder why we do this snip? It's a method of getHighlightSnippet(), which I think we are trying to get away from. Lets not do highlighting unless I specified I wanted it to be highlighted!

Is this related to the // TODO: In a future refactor just compute the snippets and store them out, don't use a function call in the template comment in docRow.js?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/o19s/splainer/issues/84, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEWGZ3G5SAGHLVBHFYUKMTSJX2NPANCNFSM4SJBV46A .

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please do advocate for this issue and ideally submit a patch to get the attention of the maintainers!