You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Peter A. Kirk" <pk...@alpha-solutions.dk> on 2009/12/23 10:43:07 UTC

SynonymFilterFactory parseRules

Hi

I am still looking at "synonyms", and the possibility of having synonyms loaded via another mechanism than reading from a text file.

A few questions:
Does anyone know why, in SynonymFilterFactory, the method "parseRules" is package private (actually I'm not sure of the terminology - what I mean is, I can't call this method from outside the package, so I can't use this method if I extend SynonymFilterFactory).

And why are "parseRules" and several other methods static?

Also, where does the "ResourceLoader" supplied to the "inform" method come from? Or, who is it that instantiates the resource-loader and the filter-factory, and calls the "inform" method. Can I influence this at all - for instance, can I inject my own "ResourceLoader" into this call?

Thanks very much for your help,.
Peter

Re: SynonymFilterFactory parseRules

Posted by Kevin Jackson <fo...@gmail.com>.
Hi

> I am still looking at "synonyms", and the possibility of having synonyms loaded via another mechanism than reading from a text file.

I am also looking at creating a DBSynonymFilterFactory which will
allow us to load the synonyms from a db.

I haven't done much apart from getting solr-trunk and creating the
class - I was going to work on it a little over the holidays as my
holidays project.

Would you like to collaborate?  Not sure how we'd manage it, but there
are enough ways of sharing code now that we could work something out?

>
> A few questions:
> Does anyone know why, in SynonymFilterFactory, the method "parseRules" is package private (actually I'm not sure of the terminology - what I mean is, I can't call this method from outside the package, so I can't use this method if I extend SynonymFilterFactory).
>
> And why are "parseRules" and several other methods static?
>
> Also, where does the "ResourceLoader" supplied to the "inform" method come from? Or, who is it that instantiates the resource-loader and the filter-factory, and calls the "inform" method. Can I influence this at all - for instance, can I inject my own "ResourceLoader" into this call?
>
> Thanks very much for your help,.
> Peter
>

Thanks,
Kev