I haven't fully thought it through, but I was thinking that, in the
create code in the Factory (where it returns then new TokenFilter),
you would simply check to see if the file is new, and if it is, reload
it and recreate the SynonymMap, accounting for threading issues, of
course, and possibly a timing mechanism such that you aren't
constantly reloading.
The old filters will just go away when they are done, just as they
always do.
On Jan 5, 2009, at 6:10 AM, Alexander Ramos Jardim wrote:
2009/1/3 Grant Ingersoll <gsing...@apache.org>
On Jan 2, 2009, at 10:25 AM, Alexander Ramos Jardim wrote:
Grant,
2. SynonymTokenFilterFactory does the "synonyms.txt" parse and
creates the
SynonymTokenFilter instance. If I want the SynonymTokenFilter to
reload
synonyms.txt file from time to time, I will need to put the file
load and
parsing strategies inside my new TokenFilter, right?
I think it can go in the SynonymFilterFactory.
How will I make SynonymFilterFactory aware of the file changes, and
how will
it destroy every filter that is using that file and recreate it?
As long as I can understand, the SynonymFilterFactory does not know
the
SynonymFilter instances it creates, as it isn't called all the time
for
doing something, so I wouldn't have an eficient way to apply my
"timer".
Just let me know if I am misunderstanding something.
2008/12/30 Grant Ingersoll <gsing...@apache.org>
I'd probably write a new TokenFilter that was aware of the reload
policy
(in a generic way) such that I didn't have to go through a whole
core
reload
every time. Are you just using them during query time or also
during
indexing?
-Grant
On Dec 30, 2008, at 8:12 AM, Alexander Ramos Jardim wrote:
Hello guys,
As the title suggests I must update my synonyms.txt file
frequently.
What
is
the best approach? Should I send a commit after the file is
updated?
Does
Solr need to be restarted after the file changes?
--
Alexander Ramos Jardim
--------------------------
Grant Ingersoll
Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ
--
Alexander Ramos Jardim
--------------------------
Grant Ingersoll
Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ
--
Alexander Ramos Jardim
--------------------------
Grant Ingersoll
Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ