approach0 / search-engine

A math-aware search engine.
http://approach0.xyz
MIT License
346 stars 50 forks source link

Suggestion #16

Closed AddemF closed 3 years ago

AddemF commented 7 years ago

I'd recommend having some ability to force searches to return only pages where certain words are found. For instance, when I searched for

Dieudonne absolutely convergent series

I only want to see results that have the word "dieudonne" in them because I'm specifically looking for an explanation of one of his theorems--but I get a lot of search results that don't have him. Having good support for exact and approximate matches, "and", "or", and other sorts of advanced search features would be helpful.

Thanks for developing this!

Best wishes, Adam

w32zhong commented 7 years ago

@AddemF Thanks for posting this suggestion here. I know many search engine supports this feature (i.e. query expression), however, at least at current stage, I would like to keep it simple as it is now. Apart from being lazy to implement this feature, I want to let you know that, given your case as an example, if you cannot get "Dieudonne" in your top search results, then most likely there is no "Dieudonne" in our index,. Since terms like Dieudonne occurs relatively less frequently in index compared to other terms, and typical search engine scoring algorithm will prioritize the document containing these rare words in our ranked search results.

In short, the search engine already tries to give you the best overall result. Although adding AND, NOT will make a lot sense in some cases when users want a level of strictness, but given the implementation complexity to be added to achieve this feature, I think it will offset the benefits of maintaining current simplicity state of the code myself, since my full-time job is getting me really busy currently. But if this project gets any bigger (more developers involve and contribute, or get enough commercial interests), it is another story.

I leave this issue open here, just in case anyone want to help to achieve this feature.

w32zhong commented 3 years ago

Solved in the latest version in the private repo.