joe_g Posted January 9, 2020 Share Posted January 9, 2020 When doing an OR search like text~=A|B|C This gives results that contains just "A", as well as "A B C". The results gets ordered in whatever manner they are ordered in the CMS, unless specifically sorted on a field. What I want, however, is to show the results that contain "A B C" first, then the results that contain "A C", "B C", "A B" afterwards, and then finally the results that contain only "A", or "B" or "C" possible? Thanks! Bonus points for being able to de-emphasize filler words like "my", "if", etc. But I realize this might be a bit too advanced? Link to comment Share on other sites More sharing options...
ngrmm Posted January 16, 2020 Share Posted January 16, 2020 i'm not an expert. But a workaround would be to have different search results in different arrays. First searching for abc. An then searching for ab, ac, bc inside abc and so on Link to comment Share on other sites More sharing options...
joe_g Posted January 26, 2020 Author Share Posted January 26, 2020 Yes, that's one way - but slow. Four words would be a lot of searches, then some PageArray gymnastics to remove duplicates... Link to comment Share on other sites More sharing options...
dragan Posted January 26, 2020 Share Posted January 26, 2020 On 1/9/2020 at 3:20 PM, joe_g said: Bonus points for being able to de-emphasize filler words like "my", "if", etc. But I realize this might be a bit too advanced? You can try to fine-tune the DB https://dev.mysql.com/doc/refman/5.7/en/fulltext-stopwords.html And for advanced stuff, you can play around with fulltext searches (raw mySQL queries). 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now