Mailing List Archive

Lucene 4.10.4 forward slash syntax error
hello i m part of the team that maintain exist-db
https://github.com/eXist-db/exist
we are using lucene 4.10.4 and we have an issue with using forward slash
we made our own custom Analyzer that produce tokens with punctuation
but we are facing some problems when trying to parse the input
we are using `org.apache.lucene.queryparser.classic.QueryParser`
and it's treating forward slash as an end of file
is it possible to modify `queryparser.classic.QueryParser`?
or a way to escape the forward slash?
thank you
--
Kind regards,
Younes Bahloul
Junior Engineer
Re: Lucene 4.10.4 forward slash syntax error [ In reply to ]
Have you tried escaping with a backslash? I have a vague memory that
might work. As for modifying classes in 4.10.4, you are welcome to do
so in a custom fork, but that version is so old that we no longer post
fixes for it on the official Apache release branches. The current
release series is 9.x - you should seriously consider upgrading. It's
a job for sure, but that is what maintenance is all about :)

On Fri, Nov 25, 2022 at 5:06 AM Younes Bahloul <younes@evolvedbinary.com> wrote:
>
> hello i m part of the team that maintain exist-db
> https://github.com/eXist-db/exist
> we are using lucene 4.10.4 and we have an issue with using forward slash
> we made our own custom Analyzer that produce tokens with punctuation
> but we are facing some problems when trying to parse the input
> we are using `org.apache.lucene.queryparser.classic.QueryParser`
> and it's treating forward slash as an end of file
> is it possible to modify `queryparser.classic.QueryParser`?
> or a way to escape the forward slash?
> thank you
> --
> Kind regards,
> Younes Bahloul
> Junior Engineer

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Lucene 4.10.4 forward slash syntax error [ In reply to ]
thank you
escaping using a backslash does work
i hope this now gets put in the archive so anyone having this question in
the future will find the answer
--
Kind regards,
Younes Bahloul
Junior Engineer


On Mon, 28 Nov 2022 at 16:23, Michael Sokolov <msokolov@gmail.com> wrote:

> Have you tried escaping with a backslash? I have a vague memory that
> might work. As for modifying classes in 4.10.4, you are welcome to do
> so in a custom fork, but that version is so old that we no longer post
> fixes for it on the official Apache release branches. The current
> release series is 9.x - you should seriously consider upgrading. It's
> a job for sure, but that is what maintenance is all about :)
>
> On Fri, Nov 25, 2022 at 5:06 AM Younes Bahloul <younes@evolvedbinary.com>
> wrote:
> >
> > hello i m part of the team that maintain exist-db
> > https://github.com/eXist-db/exist
> > we are using lucene 4.10.4 and we have an issue with using forward slash
> > we made our own custom Analyzer that produce tokens with punctuation
> > but we are facing some problems when trying to parse the input
> > we are using `org.apache.lucene.queryparser.classic.QueryParser`
> > and it's treating forward slash as an end of file
> > is it possible to modify `queryparser.classic.QueryParser`?
> > or a way to escape the forward slash?
> > thank you
> > --
> > Kind regards,
> > Younes Bahloul
> > Junior Engineer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>