• GitHub
  • Documentation
  • Discord
  • Tip
search
  • chevron_right Threads
  • label Dev Development

Suggestion for search function

whtcjdtc2007
Nov. 18, 2019
chat_bubble_outline 9
  • link
    whtcjdtc2007
    Members 14 posts
    Nov. 18, 2019, 1:07 p.m. Nov. 18, 2019, 1:07 p.m.
    link

    It seems that the search function is only work when the length of the single word is bigger than 2, but sometimes the user do need to do some short word search, especially in some other language such as Chinese, I think we could update this function so as to suite the needs of more language.

    daguguguji likes this.

    favorite 1

  • link
    whtcjdtc2007
    Members 14 posts
    Nov. 25, 2019, 6:41 a.m. Nov. 25, 2019, 6:41 a.m.
    link

    I have opened a pull request at github to fix this problem, but seems no feedback for several days...

  • link
    rafalp
    Project Lead 2027 posts
    Nov. 25, 2019, 2:18 p.m. Nov. 25, 2019, 2:18 p.m.
    link

    I plan to merge this and release as Misago 0.26 when I sit down to it next time.

    I've been also thinking if we shouldn't make this configurable in admin panel, but reducing hard-coded value will be faster fix for time-being.

  • link
    whtcjdtc2007
    Members 14 posts
    Nov. 26, 2019, 3:39 a.m. Nov. 26, 2019, 3:39 a.m.
    link
    @rafalp

    I plan to merge this and release as Misago 0.26 when I sit down to it next time.

    I've been also thinking if we shouldn't make this configurable in admin panel, but reducing hard-coded value will be faster fix for time-being.

    It sure sounds good, but is there really that much situation that need to change the value of this parameter?
    For example, do we really need to make it only useful when the length of the word is bigger than 6?
    It may could speeding up the searching process, but still seems not that important.

  • link
    rafalp
    Project Lead 2027 posts
    Nov. 26, 2019, 11:24 a.m. Nov. 26, 2019, 11:24 a.m.
    link

    It goes down to the opposite of the situation with Chinese language, eg. "going less than X characters produces garbage results or no results at all because search engine ignored phrase as too-common in search index.". Eg. if you search for word "in" or "at", or even "for". But it is a complex thing. For some forums allowing three word phrases may make sense - "for" will be filtered out at index level, but "inn" or "fox" may be useable query phrases.

  • link
    whtcjdtc2007
    Members 14 posts
    Nov. 27, 2019, 6:44 a.m. Nov. 27, 2019, 6:44 a.m.
    link

    Isn’t it strange that there is no result when a user wants to search in/at/for (just an example)? After all, if a user do search such words, there must be some reason, or else they won’t do such ‘stupid’ operations...

  • link
    rafalp
    Project Lead 2027 posts
    Nov. 27, 2019, 4:02 p.m. Nov. 27, 2019, 4:02 p.m.
    link

    Its true that it may be. But search indexes optimize for accuracy of the result, and in/at/for words bring no semantics on their own, only when connected to other words. It takes massive index size for good relevacy when you are taking account for those words, so popular implementations don't do it. Some indexes will take care to record relationship between two phrases connected with one of those words, but AFAIK PostgreSQL's fulltext search just discards them.

  • link
    rafalp
    Project Lead 2027 posts
    Dec. 1, 2019, 10:35 p.m. Dec. 1, 2019, 10:35 p.m.
    link

    Your PR has been merged and released with Misago 0.26. Thank you for your help!

  • link
    whtcjdtc2007
    Members 14 posts
    Dec. 2, 2019, 9:02 a.m. Dec. 2, 2019, 9:02 a.m.
    link

    It's always good to help misago become better ;-D

  • link
    daguguguji
    Members 2 posts
    Dec. 26, 2019, 2:20 p.m. Dec. 26, 2019, 2:20 p.m.
    link

    @octobug
    You may try this, more flexible searching for Chinese

arrow_upward Go to top
  • This site uses cookies to gather statistical data for use in traffic analysis.
  • GitHub
  • Documentation
  • Discord
  • Tip
  • Terms of service
  • Privacy policy
powered by misago