Jisho

×
420b05f798587712130e5ed33a3abde0
3 Replies ・ Started by arielCo at 2023-10-14 21:34:35 UTC ・ Last reply by lambdawinner829 at 2023-11-16 06:07:35 UTC

Improve OpenSearch engine definition to allow searching for multiple words

Currently the search engine definition at /opensearch.xml uses the URL template https://jisho.org/search/{searchTerms}, which doesn't work well with multi-word queries: e.g. searching for “express train” will result in a search for “express+train” and 0 results.

However, using https://jisho.org/search?keyword={searchTerms} works perfectly as far as I can tell, because the term is interpreted correctly as a query parameter value.

I just installed a custom search engine and I think the change would help others.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2023-10-19 09:59:04 UTC

Great idea. I’ll see if I can do this quickly on the current site, or ifs something I’ll add to the next version of the site.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2023-10-21 10:57:43 UTC

I just fixed the opensearch.xml file as you suggested. Thanks!

B1ad628f567671f6a9c73a4ee677f388
lambdawinner829 at 2023-11-16 06:07:35 UTC

I’m not sure how OpenSearch is actually supposed to work. I mean as a software. I know how to be a user but I’ve never delved deep into coding.

to reply.