When building a picture browsing site, a picture contains n tags.
It is now divided into a table for pictures, a table for labels, and a table for pictures-labels.
The first thing we did was to use like to query the keywords separated by spaces. For example, the keyword "men's shoes" will query all the keywords with "men" or "shoes". If we query "men's shoes", nothing will appear. result. Now we hope that if we query "men's shoes" or "men's shoes", only those that contain both "men" and "shoes" will appear.
The above examples are for reference only. Keywords may not be included at the same time. Which one is more appropriate? The most commonly seen Java version of the search engine is Lucene. I wonder if it can be integrated with SSM to create a paging query effect?
If you use a word segmenter for word segmentation, what is more suitable?
It is recommended to use elasticsearch for search. If you want to segment words, you can use ik segmenter
Lucene can use Paoding tokenizer.
PHP with Sphinx + Coreseek / Xunsearch
Lucene implementation, solr
There are now very mature solutions of this type, such as solr and elasticsearch, which are open source search engines and can add, delete, modify and check data through simple http requests