Thanks Otis.
I tried putting the absolute path and it worked. But I wanted something
configurable so that it can be changed if required.(may be thro an admin
interface?)
In the mean time, another idea stuck to maintain all the synonyms in
database. I tried writing a FilterFactory of my own for creating the
SynonymMap and SynonymFilter. I couldn't get this working and getting
NullPointerException as in the stack trace below.
21:16:10,921 ERROR [STDERR] 23-Apr-2009 21:16:10
org.apache.solr.common.SolrException log
SEVERE: java.lang.NullPointerException
at
org.apache.solr.analysis.SynonymFilter.next(SynonymFilter.java:79)
at org.apache.lucene.analysis.StopFilter.next(StopFilter.java:120)
at
org.apache.solr.analysis.WordDelimiterFilter.next(WordDelimiterFilter.java:272)
at
org.apache.lucene.analysis.LowerCaseFilter.next(LowerCaseFilter.java:34)
at
org.apache.solr.analysis.EnglishPorterFilter.next(EnglishPorterFilterFactory.java:106)
at org.apache.lucene.analysis.TokenStream.next(TokenStream.java:47)
at
org.apache.solr.analysis.BufferedTokenStream.read(BufferedTokenStream.java:94)
at
org.apache.solr.analysis.BufferedTokenStream.next(BufferedTokenStream.java:80)
at org.apache.lucene.analysis.TokenStream.next(TokenStream.java:91)
at
org.apache.lucene.queryParser.QueryParser.getFieldQuery(QueryParser.java:519)
at
org.apache.solr.search.SolrQueryParser.getFieldQuery(SolrQueryParser.java:116)
at
org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1324)
at
org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1211)
at
org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1139)
at
org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1128)
at
org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:170)
at
org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:79)
at
org.apache.solr.search.OldLuceneQParser.parse(LuceneQParserPlugin.java:119)
at org.apache.solr.search.QParser.getQuery(QParser.java:88)
at
org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:82)
It looks like I am missing some configuration and solr is not updating the
SynonymMap or SynonymFilter when my factory class is invoked. But I am sure
that my factory class is invoked.
In the schema.xml, I updated the index analyzer as
The query analyzer is updated as
Is there any thing which is obvious that's missed?
Regards,
Raja
--
View this message in context:
http://www.nabble.com/Synonym-file-in-a-different-location-tp23195669p23200257.html
Sent from the Solr - User mailing list archive at Nabble.com.