2010/3/24 Ahmet Arslan <iori...@yahoo.com> > > With this configuration, the title field is highlighted > > only when there's a > > perfect match, i.e., the quoted query equals the title > > content (f.i., > > q="Terrain sehloul" allows highlighting the entire title > > containing "Terrain > > sehloul", > > Exactly. There should be a *perfect* match for string typed fields to > return snippets. > > > but q=Terrain sehloul doesn't enable to highlight > > this title. Is > > there a solution to this problem? > > Escaping (using backslash) whitespace can solve this problem. > q=Terrain\ sehloul > > Now i clearly understand you. You have a title field containing 'Terrain > sehloul' and you want to get highlighting with the query Terrain. You cannot > do that with type="string". You need a tokenized field type in your case. >
Thank a lot Ahmet. In addition, I want to highlight phrases containing stop words. I guess that the best way is to use a tokenized type without stopwordFilter. Do you agree with me defining a new type for this purpose ? By he way, I wanted to highlight a phrase using a tokenized field type, but I got wrong result; I tried 2 cases (q=Terrain\ sehloul and q="Terrain sehloul"), and I got the following: <em>Terrain</em> <em>sehloul</em> Any ideas? Thanks