In my SOLR, i have indexed the开发者_开发知识库 keys (converted to string because the array wasn't saving) of the group which have the permission to display the object.
<visibility>
6-15-8
</visibility>
'fq' => "current_status_i:".Ressource::STATUS_PUBLISHED ." + lang_t:".$culture. "+ visibility_s".$visibility
The problem is that if the input for visibility is 15 it'll output 0 result because it does not match 6-15-8.
So , *what is the syntax to mimic the "LIKE" * in order to have result if the input is 15, or 8....
Thanks
You need to use multi-valued fields in Solr - they allow you to store multiple values for the same field. Check this and this for more details. Alternately, you can change the field type to ensure that the field is tokenized on -
so that each value gets indexed separately.
Let me know how exactly you create the index and post your schema.xml. I will then be able to give you some more details about adding multi-valued fields to your index.
There are two options
- Range query: fq=visibility:[1 To 15]
- OR conditions: fq=visibility:6 OR 15 OR 8, (If you know these are the only 3 valid values in your system)
精彩评论