Hey team, I’m running into some trouble with my Ty...
# community-help
m
Hey team, I’m running into some trouble with my Typesense search setup. It’s not reliably searching across full documents. The content is chunked and indexed, and when I search, I’m getting partial or inconsistent matches. Not sure if I’ve over cleaned the text before indexing, or if I’m missing something in how Typesense expects things to be structured (especially for long content). I also tried tweaking schema configs (like enabling/disabling stemming) and search parameters, but special characters (
"
,
-
,
@
, etc.) and sentence-level matches are still hit or miss. Any guidelines or examples on how to best prep and index full-text content so search works well across entire documents?
a
Hey Meghna, Could you share more details? If possible, try to put together a reproducible example using some documents, following this format: https://gist.github.com/jasonbosco/7c3432713216c378472f13e72246f46b In general, for symbols, you’ll want to configure
symbols_to_index
(more details in the docs). Your approach to chunking the document is the correct one!
m
Thanks! I’ve been testing with the
/multi_search
endpoint and grouping results by a
parentId
field (since multiple chunks belong to the same document). Right now, I’m just using the first hit per group but since multiple chunks have the same score, the first one isn’t always the most relevant. Is there a better way to surface the most relevant chunk within a group of results from the same document? Ideally, I’d want to rank or collapse the chunks so the top one per document is the best match, not just the first with a shared score. Also, if there a better way to retrieve a better result when querying on multiple
string
fields? Also, what kind of information would be most helpful for debugging this?
a
Meghna, can you share the curl search you are performing? (feel free to send over my DM for privacy reason) I will be able to help you maximize it's performance better this way
👀 1
m
Also, coming across one more issue for the search, if we strip some of the special characters to make it easy to pop up relevant search results, it behaves differently when the resulting query is basically the same. For example: stripping query
"panthera tigris"
to
panthera tigris
where the unstripped version produces results but the stripped one does not.