I am trying to move my code from luceneLucene to solr Solr, but am facing aan issue ,. I have 4 fields from the data is indexed , all the field are of text_general type ( fromfrom the managed schema ) ,. The code from luceneLucene is:
filterSearchText = filterSearchText.Or(x => x.LastName.Contains(searchRequest.Keyword));
filterSearchText = filterSearchText.Or(x => x.Content.Contains(searchRequest.Keyword));
filterSearchText = filterSearchText.Or(x => x.RelatedContent.Contains(searchRequest.Keyword));
filterSearchText = filterSearchText.Or(x => x.SearchKeywords.Contains(searchRequest.Keyword));
soSo whenever iI search a single word (healthe.g. "health") solr alsoSolr gives the same results as lucene gives Lucene, but when iI search multiple words (health sere.g. "health ser") it does not give any result. The query is generated in the logs is as follows for single and multiple words ,:
last_name_t:(*health*) OR _content:(*health*) OR relatedcontent_s:(*health*) OR search_keywords_t:(*health*)
and for multiple words
last_name_t:("\*health ins\*") OR _content:("\*health ins\*") OR relatedcontent_s:("\*health ins\*") OR search_keywords_t:("\*health ins\*")
but when iI search for the full keywords such as (health servicese.g. "health services") iI get correct results with the query:
last_name_t:("\*Health Services\*") OR _content:("\*Health Services\*") OR relatedcontent_s:("\*Health Services\*") OR search_keywords_t:("\*Health Services\*")
So what is the replacement for finding the exact substring in solr .Solr?