Running into a bit of an issue using Slop with SOLR. Previously on Lucene indexes we were able to use the .Like() method on the IQueryable result from the SearchContext. The code runs roughly like so
var results = context.GetQueryable<CustomTypeUsedBySite>().
Where(z =>
z["Keywords"].Contains(queryStringFromUser).Boost(.9f)
|| z.Content.Like(queryStringFromUser, intSlopVariable));
The query that Sitecore produces to SOLR seems to ignore the integer passed in with this method and always defaults to .5 and also wraps the whole query in double quotes.
((keywords_t:("\*Auto Coverage\*"))^0.899999976158142 OR _content:("Auto Coverage\~0.5"))
I've tried manually removing the inSlopVariable and hard coding 10 in place of it and still get the .5 being set. It also changes the format used in the query when there is only one word or phrase which seems to give me a better result but still ignores the slop value.
((keywords_t:(*Coverage*))^0.899999976158142 OR _content:(Coverage~0.5))
When making a query manually I got result that I was looking for with this query
((keywords_t:("\*Auto Coverage\*"))^0.899999976158142 OR _content:("Auto Coverage"~10))
Did some digging and found someone reporting a similar issue as well (https://community.sitecore.net/developers/f/8/t/6990) but looks to be rather old.
Any help would be fantastic,
Thanks!
Sitecore.ContentSearch.Linq.Solr.SolrQueryMapper.VisitLike
. I'll try to spelunk a bit later