'Ignore sub sup elements in search

In continuation from the link- (Ignore elements in cts:search)

I have for eg 3 scenarios for phrase search-

1. CO<sub>2</sub> lasers
2. <sup>2</sup>H- and <sup>3</sup>H-induced few nucleon transfer reactions
3. Mixed state, H<sub>c2</sub>, surface sheath

I have created a field query & defined it in a constraint named 'CL'. Now-

  1. CL:"CO2 lasers"
  • Works with tokenizer overrides value set to 2, symbol.
  1. CL:"2H- and 3H-induced few nucleon transfer reactions"
  • Works with tokenizer overrides value set to 3, symbol. Does each additional occurrence of sub sup element increase the tokenizer character value?
  1. CL:"Mixed state, Hc2, surface sheath"
  • Fails for this scenario as it seems it works only for numerical values in sub,sup. In this case the value of sub is 'c2'. Is there a way we can make this work?

Also is there a solution to make this work in case of free text search? for eg phrase search without using constants- "CO2 lasers" "2H- and 3H-induced few nucleon transfer reactions" "Mixed state, Hc2, surface sheath"

Any help would be really appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source