You are reading a single comment by @Velocio and its replies. Click here to read the full conversation.
  • Hashtag searching is here: https://github.com/microcosm-cc/microcosm/blob/master/models/search_fulltext.go#L158-L168

    	var filterHashTag string
    	for _, hashtag := range m.Query.Hashtags {
    		filterHashTag += `
                  AND si.` + fullTextScope + `_text ~* '\W` + hashtag + `\W'`
    	}
    

    So that search is happening on the plain text bit just above the text index.

    What is \W in regular expressions? That matches any non-word character.

    Ah... so hypothesis time... what we're seeing is that if the hashtag starts at the beginning of a sentence or end of a sentence, and lacks one of these non-word characters, then this search doesn't match.

    Let's test that.

About

Avatar for Velocio @Velocio started