Modifying the standard analyzer

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Modifying the standard analyzer

Mark Miller-3
I have added support for sent/para prox search by modifying the notspan
query. In doing so I have changed the standard analyzer javacc .jj file.
Here is my problem:

the javacc generated StandardTokenizer next() method is declared to throw a
ParseException

  final public org.apache.lucene.analysis.Token next() throws
ParseException, IOException {

unfortunately, org.apache.lucene.analysis.Token next() only throws an
IOException.

I do not understand this problem because the code seemed to work fine before
I changed the .jj file even though the StandardTokenizer next() method seems
to throw a ParseException in the original lucene code. Why does it compile
fine to begin with?

I have seen mention of this in my searching but never an answer. Right now I
am just eating the ParseException in the next() method but this is a pain
because I have to write in the code to eat it everytime I gen the javacc
files. What a pain for the next guy who has to mess with my code.

Any ideas?

Thanks,

mark
Reply | Threaded
Open this post in threaded view
|

Re: Modifying the standard analyzer

Daniel Naber-5
On Freitag 07 Juli 2006 16:20, Mark Miller wrote:

> the javacc generated StandardTokenizer next() method is declared to
> throw a ParseException
>
>   final public org.apache.lucene.analysis.Token next() throws
> ParseException, IOException {
>
> unfortunately, org.apache.lucene.analysis.Token next() only throws an
> IOException.

But ParseException extends IOException, so I don't see a problem there.

Regards
 Daniel

--
http://www.danielnaber.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Modifying the standard analyzer

Mark Miller-3
Daniel Naber wrote:

> On Freitag 07 Juli 2006 16:20, Mark Miller wrote:
>
>  
>> the javacc generated StandardTokenizer next() method is declared to
>> throw a ParseException
>>
>>   final public org.apache.lucene.analysis.Token next() throws
>> ParseException, IOException {
>>
>> unfortunately, org.apache.lucene.analysis.Token next() only throws an
>> IOException.
>>    
>
> But ParseException extends IOException, so I don't see a problem there.
>
> Regards
>  Daniel
>
>  
I wish my compiler agreed with you:) Which it seems to do until you
rebuild the files with javacc. I saw at least two other posts about this
problem on the web with no answer given...

This guy also found the same issue:
(could only get this from google cache)

http://216.239.51.104/search?q=cache:CSV6j48f0-AJ:mail-archives.apache.org/mod_mbox/jakarta-lucene-user/200310.mbox/%253CDCEE3C62548AFE48ADF88CBFDB8260A203CBBA51%40NGMAIL3%253E+lucene+standardtokenizer+throws+parseexception&hl=en&gl=us&ct=clnk&cd=1


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Modifying the standard analyzer

Chris Hostetter-3

: > But ParseException extends IOException, so I don't see a problem there.

: I wish my compiler agreed with you:) Which it seems to do until you
: rebuild the files with javacc. I saw at least two other posts about this
: problem on the web with no answer given...

: This guy also found the same issue:
: (could only get this from google cache)

the reason you could only get the google cache was because the mailinst
changed names a while back, but if you find the new URL and look at
the replies you'll see the answer...

http://mail-archives.apache.org/mod_mbox/lucene-java-user/200310.mbox/%3cF362EED0-FB9F-11D7-9907-000393A564E6@...%3e

-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Modifying the standard analyzer

Mark Miller-3
Thank you so much. I apologize for my ignorance.

Mark

On 7/7/06, Chris Hostetter <[hidden email]> wrote:

>
>
> : > But ParseException extends IOException, so I don't see a problem
> there.
>
> : I wish my compiler agreed with you:) Which it seems to do until you
> : rebuild the files with javacc. I saw at least two other posts about this
> : problem on the web with no answer given...
>
> : This guy also found the same issue:
> : (could only get this from google cache)
>
> the reason you could only get the google cache was because the mailinst
> changed names a while back, but if you find the new URL and look at
> the replies you'll see the answer...
>
>
> http://mail-archives.apache.org/mod_mbox/lucene-java-user/200310.mbox/%3cF362EED0-FB9F-11D7-9907-000393A564E6@...%3e
>
> -Hoss
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>