Jisho

×
Fb50b47c85e73d568c375db55a88e50a
1 Reply ・ Started by Squib02 at 2017-04-22 16:43:31 UTC ・ Last reply by Kimtaro Admin at 2017-04-25 17:41:15 UTC

Question about searching

I am currently working on a project similar to jisho, but in another language. I'm curious if any of the devs would give insight into the searching and sorting that goes on in the backend when the user searches for a word.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2017-04-25 17:41:15 UTC

We've written our own search logic on top of a MongoDB database. It's a fairly simple setup where we break each dictionary entry into searchable tokens that we index and store with the entry. When a user searches we look for entries that have those search terms as indexed tokens. We also do a bunch of cleanup and normalisation of the search terms and tokens, but that is the gist of it.

Sorting is a custom algorithm that weighs different tokens based on how relevant we think they might be.

Does that answer your question?

to reply.