$search = $solr->search($_GET['search'], 0, 100, array('fq' => 'sm_keywords:topnews', 'sort' => 'created desc'));
I am use a php library for Solr and have a field sm_keywords which has comma separated keywords.
Examples:
topnews,golf,tennis
beach,sports,volleyball
I want to do a query where I can match a keyword such as “sports” anywhere in the string. Currently it will only match at the beginning. I tried doing keyword, but I got a 400 error. How can this be accomplished?
What I would suggest you to do is to index every keyword as a separate term, probably even as a different value of the same multivalued field. That way your filter will work without the need of any wildcard.