4

As already reported on Discord (but I think it makes sense to have it tracked here), Kagi's automatic search query truncation leaves room for improvement.

Searching for the Sigmund Freud quote

"Die Melancholie ist seelisch ausgezeichnet durch eine tiefe schmerzliche Verstimmung, eine Aufhebung des Interesses für die Außenwelt, durch den Verlust der Liebesfähigkeit, durch die Hemmung jeder Leistung und die Herabsetzung des Selbstgefühls, die sich in Selbstvorwürfen und Selbstbeschimpfungen äußert und bis zur wahnhaften Erwartung der Strafe steigert."

(with the quotation marks) will (seemingly) be reduced to

"Die Melancholie ist seelisch ausgezeichnet durch eine tiefe schmerzliche Verstimmung, eine Aufhebung des Interesses für die Außenwelt, durch den Verlust der Liebesfähigkeit, durch die Hemmung jeder Leistung und die Herabsetzung des Selbstgefühls,

which is technically wrong, as it will probably find the correct context, but that's only because of a number of these words rarely appear together. However, if I have an "exact" search query of more than 32 words, I don't expect a search engine to just search for the first 32 words in any order.

It would probably make sense to not truncate the closing quotation mark here.

  • Vlad replied to this.

    Value7609 Verbatim search "works" (although it only returns one result), indeed. But this is not obvious IMO.

    tux0r Can you compare Kagi's behavior to other major search engines to understand differences in the way it is handled?

      Vlad not OP, but I did some quick tests with duckduckgo, bing and google.

      Both bing and Google have a character limit for their search box, so you can't enter more characters, for Google it is 2048 characters, for Bing it is 2000.

      But when searching via the address bar (Firefox allows 5000 characters in the address bar for me), both search engines don't truncate the search query, at least it is not visible to the user.

      DuckDuckGo does not have a limit implemented in the frontend, but it just gives you a "query too long" error popup after some threshold, and does not even execute the query.

      So the recommendation is to add character limit (2000?) Anything else?

        Vlad Anything else?

        And do not remove the trailing ".

        • Vlad replied to this.

          tux0r you have to remove something if there is char/word limit, that assumes the rest is cut off

            Vlad Nothing is wrong with removing something. However, I assume that the first quotation mark is counted as a part of the first word here. Just count the last one as a part of the last word (that fits the limit)?

              Vlad I'd also recommend implementing a character limit in the frontend like google and bing do, this way, if a user searches via the kagi search bar and not the browser bar they already can't enter more than you allow, this way it is clearer to the user that this query reached the limit. Otherwise, the user will search for it and then see the truncation message, this may save one search (although I don't think that many people do search queries >2000 characters).

              Bing even displays counter, which is also quite nice:

              I know that this would require JS, but it could be a nice additional feature. I know that the html maxlength does not check for word count, but this could be nice as well.

              No one is typing