Did you check ../admin/analysis.jsp page to see how index and query analyzer behaved? In usual, when you add "parti socialiste" to synonyms-fr.txt, it would response correctly both of "PS et" and "parti socialiste" queries.
On Mon, Aug 30, 2010 at 4:55 PM, Xavier Schepler < xavier.schep...@sciences-po.fr> wrote: > Hi, > > several documents from my index contain the phrase : "PS et". > However, PS is expanded to "parti socialiste" and a phrase search for "PS > et" fails. > A phrase search for "parti socialiste et" succeeds. > > Can I have both queries working ? > > > Here's the field type : > > <fieldtype name="SyFR" class="solr.TextField"> > <analyzer type="index"> > <tokenizer class="solr.StandardTokenizerFactory"/> > <filter class="solr.StandardFilterFactory"/> > <!-- Synonyms --> > <filter class="solr.SynonymFilterFactory" synonyms="synonyms-fr.txt" > ignoreCase="true" expand="true"/> > <filter class="solr.LowerCaseFilterFactory"/> > <charFilter class="solr.MappingCharFilterFactory" > mapping="mapping-ISOLatin1Accent.txt"/> > </analyzer> > <analyzer type="query"> > <tokenizer class="solr.StandardTokenizerFactory"/> > <filter class="solr.StandardFilterFactory"/> > <filter class="solr.LowerCaseFilterFactory"/> > <charFilter class="solr.MappingCharFilterFactory" > mapping="mapping-ISOLatin1Accent.txt"/> > </analyzer> > </fieldtype> >