On Fri, 9 Sep 2016, Dirk Rothe wrote:
Am 09.09.2016, 00:29 Uhr, schrieb Andi Vajda <va...@apache.org>:
On Thu, 8 Sep 2016, Dirk Rothe wrote:
Am 08.09.2016, 15:56 Uhr, schrieb Andi Vajda <va...@apache.org>:
On Thu, 8 Sep 2016, Dirk Rothe wrote:
I've made initReader() python-overridable (see patch). What do you
think?
Not sure what to think. While your change looks fine, if Lucene decided
to make this 'hard', it may be a sign that you're doing something wrong
or going the wrong way about it.
I suggest you ask on the java-u...@lucene.apache.org list as you're
probably not the first one to transition from 3.x to something more
recent.
Please let pylucene-dev@ know what you find out...
OK.
Making Analyzer.initReader() python-overridable is also important for
use-cases like this: http://stackoverflow.com/a/10290635
So the patch should be fine independently of my usage/hack.
Actually, your patch is not good enough. You need to add an implementation
for initReader() in all the tests that make a subclass of PythonAnalyzer
(search for createComponents() implementations) otherwise, when
initReader() gets called from Java, you'll get a stack overflow (it'd be
good, as an aside, if I could make a better error out of that...).
OK, I see the effect in samples/PorterStemmerAnalyzer.py (fixed some imports
there, use patch).
I see no patch attached probably because the apache mail server strips
attachments sent to mailing lists. Either you include the patch inline or
you send it to me as an attachment directly.
Thanks !
Andi..
Shouldn't the need for implementation be optional? I don't understand.
--dirk