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
Ignore HTML tags in the document. So ideally we'd only index text outside of tags.
Ex. <p>Who wants some <b>chimi</b>changas?</p>
If I query for chimichangas the indexed document should ignore <b> and </b> as well as the <p>, </p> tags and index chimichangas as one word.
The returned hits for chimichangas should return <p>Who wants some <b>chimi</b>changas?</p>.
A great bonus would be that highlights works with this as well. Ex: <p>Who wants some <CustomHighlightTag><b>chimi</b>changas</CustomHighlightTag>?</p>
The text was updated successfully, but these errors were encountered:
For a simple solution you could introduce an artificial field where all html tags are removed. This will not solve your highlight problem, but I think this can not be solved at all:
Ex text: <p>Who wants some <b>vegan chimi</b>changas?</p>
Ex result: Ex: <p>Who wants some <b>vegan <CustomHighlightTag>chimi</b>changas</CustomHighlightTag>?</p>
Agreed on having a searchable field that excludes the HTML tags and having a non searchable field that has the HTML tags. This would double the size of each document but I think Typesense only stores searchable fields in RAM.
That's a really good point that the highlight tags could potentially break the HTML. Is it possible for typesense to return the offset positions of where the search query matched in the document?
Description
Ignore HTML tags in the document. So ideally we'd only index text outside of tags.
Ex.
<p>Who wants some <b>chimi</b>changas?</p>
If I query for chimichangas the indexed document should ignore
<b>
and</b>
as well as the<p>, </p>
tags and index chimichangas as one word.The returned hits for chimichangas should return
<p>Who wants some <b>chimi</b>changas?</p>
.A great bonus would be that highlights works with this as well. Ex:
<p>Who wants some <CustomHighlightTag><b>chimi</b>changas</CustomHighlightTag>?</p>
The text was updated successfully, but these errors were encountered: