Currently I'm facing a problem in multi-word synonym in Solr. So I thought up a solution step:
Step:
- Solr plugin intercept the search keyword.
- Plugin will get the list of acronym, synonym etc from database table
- Plugin will compare the search keyword one by one from the synonym list that extract just now at 2
- If exist, the search keyword will convert into the synonym word.
- Depends on the result, plugin will decide which fieldtype/filter/tokenizer to put into 6 parameter.
- Plugin will return (keyword, which field to search into, which analyzer to use) for Solr to search.
The questions:
- can plugin intercept the search keyword so that it can be processed in plugin?
- can I access and get records directly from DB in Solr plugin?
- can plugin tell Solr what to search, search on which field and use what filter/tokenizer to search? Or can plugin straight away do searching within plugin and pop out the result?
Thank you.