Phrase search + multi-word index time expanded synonym

2010-09-08 Thread Xavier Schepler

Hello,

well, first, here's the field type that is searched :

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

here's the synonym from the synonyms-fr.txt file :

...
PS,Parti socialiste
...

and here's the query :

PS et.

It returns no result, whereas Parti socialiste et returns the results.

How can I have both queries working ? I'm thinking about different 
configurations but I didn't found any solution at the moment.

Thx for reading,

Xavier Schepler


Re: Phrase search + multi-word index time expanded synonym

2010-09-08 Thread Xavier Schepler

On 08/09/2010 12:21, Grijesh.singh wrote:

see the analysis.jsp with debug verbose and see what happens at index time
and search time during analysis with your data

Also u can use debugQuery=on for seeing what actually parsed query is.

-
Grijesh
   
I've found a first solution by myself, using the query analyzer, that 
works for couple of synonyms. I have to test it with rows of 3 or 4 
equivalents synonyms.

I used analysis.jsp.

The query time analyzer became :

analyzer type=query
tokenizer class=solr.StandardTokenizerFactory/
filter class=solr.StandardFilterFactory/
filter class=solr.SynonymFilterFactory synonyms=synonyms2-fr.txt 
ignoreCase=true expand=true/

filter class=solr.LowerCaseFilterFactory/
charFilter class=solr.MappingCharFilterFactory 
mapping=mapping-ISOLatin1Accent.txt/

/analyzer

And the synonyms2-fr.txt contains :

PS = Parti socialiste

Thxs for your reply.