0

I have two fields as below

"ad_code":["fsCy"],

"ad_code_string":"fsCy",

Field Definition

<field name="ad_code_string" type="string" indexed="true" stored="true"/>

<field name="ad_code" type="text_general"/>

enter image description here

Though the Analysis shows the match prashes, when I query the results are not displayed

Here the bottom half of the analysis

enter image description here

  • 1
    What does your query look like - how are you querying Solr? A `string` field will not be case insensitive, so `ad_code` is the only field that could produce a hit in that case. – MatsLindh Apr 27 '21 at 07:43
  • @MatsLindh I'm trying to query like ```ad_code:"fscy"``` OR ```ad_code_string:"fscy"``` – sarin Wickramasinghe Apr 28 '21 at 05:18
  • Your first query should give a hit - but make sure to look at the end tokens on both sides in your analysis tool. – MatsLindh Apr 28 '21 at 07:58
  • Does your last filter match? Can't see the full filter list in your image? – drillep Apr 30 '21 at 17:35
  • @drillep I have updated the filter list second half in the description – sarin Wickramasinghe May 17 '21 at 06:27
  • @MatsLindh " but make sure to look at the end tokens on both sides in your analysis tool." can you explain this to me, I didn't get this – sarin Wickramasinghe May 17 '21 at 06:27
  • If you use the Analysis tool in Solr, it's the tokens that are _at the bottom_ in each of the columns (index, query) that matter. It does not matter if they're hits halfway through if the tokens are modified further before the last stage. As shown in the part you've added, the `fscy` token gets changed to `fsci` in the last stage. The same change does not happen to the query value, and you end up with `fsci` on one side and `fscy` on the other - which isn't a match. It seems you have a synonym filter (I'm guessing that's what the last SF on the left side is (hover over to see the name)) that – MatsLindh May 17 '21 at 07:14
  • changes the actual token value in the last stage of your indexing chain. – MatsLindh May 17 '21 at 07:14

0 Answers0