Mailing List Archive

exception with parse & quote
All luceners...

this.....

String queryStr="9\" Speaker";
logger.debug("query string...queryStr=" + queryStr);
Analyzer analyzer = new StandardAnalyzer();
Query query = QueryParser.parse(queryStr, "", analyzer);


produces....

query string...queryStr=9" Speaker
org.apache.lucene.queryParser.TokenMgrError: Lexical error at line 1, column 11. Encountered: <EOF> after : "\" Speaker"
at org.apache.lucene.queryParser.QueryParserTokenManager.getNextToken(Unknown Source)
at org.apache.lucene.queryParser.QueryParser.jj_scan_token(Unknown Source)
at org.apache.lucene.queryParser.QueryParser.jj_3_1(Unknown Source)
at org.apache.lucene.queryParser.QueryParser.jj_2_1(Unknown Source)
at org.apache.lucene.queryParser.QueryParser.Clause(Unknown Source)
at org.apache.lucene.queryParser.QueryParser.Query(Unknown Source)
at org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)
at org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)


but this works.....

String queryStr="9 Speaker";



shouldn't.....



shouldn't this behave the same if I call analyzer.tokenStream directly (which correctly strips the " out ?


thanks for any help....






Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
RE: exception with parse & quote [ In reply to ]
because " sign in query means the start of a phrase; for example "Lucene User" query is not equal to Lucene User.

query parser thinks that after a " sign there is an other " ; EOF encountered without any closing "

peter

> -----Original Message-----
> From: a person [mailto:a.person@eudoramail.com]
> Sent: Wednesday, July 03, 2002 5:28 PM
> To: lucene-user@jakarta.apache.org
> Subject: exception with parse & quote
>
>
> All luceners...
>
> this.....
>
> String queryStr="9\" Speaker";
> logger.debug("query string...queryStr=" + queryStr);
> Analyzer analyzer = new StandardAnalyzer();
> Query query = QueryParser.parse(queryStr, "", analyzer);
>
>
> produces....
>
> query string...queryStr=9" Speaker
> org.apache.lucene.queryParser.TokenMgrError: Lexical error at
> line 1, column 11. Encountered: <EOF> after : "\" Speaker"
> at
> org.apache.lucene.queryParser.QueryParserTokenManager.getNextT
> oken(Unknown Source)
> at
> org.apache.lucene.queryParser.QueryParser.jj_scan_token(Unknow
> n Source)
> at
> org.apache.lucene.queryParser.QueryParser.jj_3_1(Unknown Source)
> at
> org.apache.lucene.queryParser.QueryParser.jj_2_1(Unknown Source)
> at
> org.apache.lucene.queryParser.QueryParser.Clause(Unknown Source)
> at
> org.apache.lucene.queryParser.QueryParser.Query(Unknown Source)
> at
> org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)
> at
> org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)
>
>
> but this works.....
>
> String queryStr="9 Speaker";
>
>
>
> shouldn't.....
>
>
>
> shouldn't this behave the same if I call
> analyzer.tokenStream directly (which correctly strips the " out ?
>
>
> thanks for any help....
>
>
>
>
>
>
> Join 18 million Eudora users by signing up for a free Eudora
> Web-Mail account at http://www.eudoramail.com
>
> --
> To unsubscribe, e-mail:
> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:lucene-user-help@jakarta.apache.org>
>
>

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
RE: exception with parse & quote [ In reply to ]
Thanks...
Any easy way around this problem? Because " in this case means inch and is
not really intended to be searched on....
Is the best way to handle this then to use the analyzer.tokenStream directly
to strip the " before parsing?

If so, what is the point of parsing?


-----Original Message-----
From: Halácsy Péter [mailto:halacsy.peter@axelero.com]
Sent: Wednesday, July 03, 2002 11:37 AM
To: Lucene Users List
Subject: RE: exception with parse & quote


because " sign in query means the start of a phrase; for example "Lucene
User" query is not equal to Lucene User.

query parser thinks that after a " sign there is an other " ; EOF
encountered without any closing "

peter

> -----Original Message-----
> From: a person [mailto:a.person@eudoramail.com]
> Sent: Wednesday, July 03, 2002 5:28 PM
> To: lucene-user@jakarta.apache.org
> Subject: exception with parse & quote
>
>
> All luceners...
>
> this.....
>
> String queryStr="9\" Speaker";
> logger.debug("query string...queryStr=" + queryStr);
> Analyzer analyzer = new StandardAnalyzer();
> Query query = QueryParser.parse(queryStr, "", analyzer);
>
>
> produces....
>
> query string...queryStr=9" Speaker
> org.apache.lucene.queryParser.TokenMgrError: Lexical error at
> line 1, column 11. Encountered: <EOF> after : "\" Speaker"
> at
> org.apache.lucene.queryParser.QueryParserTokenManager.getNextT
> oken(Unknown Source)
> at
> org.apache.lucene.queryParser.QueryParser.jj_scan_token(Unknow
> n Source)
> at
> org.apache.lucene.queryParser.QueryParser.jj_3_1(Unknown Source)
> at
> org.apache.lucene.queryParser.QueryParser.jj_2_1(Unknown Source)
> at
> org.apache.lucene.queryParser.QueryParser.Clause(Unknown Source)
> at
> org.apache.lucene.queryParser.QueryParser.Query(Unknown Source)
> at
> org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)
> at
> org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)
>
>
> but this works.....
>
> String queryStr="9 Speaker";
>
>
>
> shouldn't.....
>
>
>
> shouldn't this behave the same if I call
> analyzer.tokenStream directly (which correctly strips the " out ?
>
>
> thanks for any help....
>
>
>
>
>
>
> Join 18 million Eudora users by signing up for a free Eudora
> Web-Mail account at http://www.eudoramail.com
>
> --
> To unsubscribe, e-mail:
> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:lucene-user-help@jakarta.apache.org>
>
>

--
To unsubscribe, e-mail:
<mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:lucene-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
RE: exception with parse & quote [ In reply to ]
I don't know. Maybe you could replace " chars in in the text before indexing and in incoming query

or write your own analyzer?

peter


> -----Original Message-----
> From: Philip-Allen [mailto:PAllen2@OfficeDepot.com]
> Sent: Wednesday, July 03, 2002 5:42 PM
> To: Lucene Users List
> Subject: RE: exception with parse & quote
>
>
>
> Thanks...
> Any easy way around this problem? Because " in this case
> means inch and is
> not really intended to be searched on....
> Is the best way to handle this then to use the
> analyzer.tokenStream directly
> to strip the " before parsing?
>
> If so, what is the point of parsing?
>
>
> -----Original Message-----
> From: Halácsy Péter [mailto:halacsy.peter@axelero.com]
> Sent: Wednesday, July 03, 2002 11:37 AM
> To: Lucene Users List
> Subject: RE: exception with parse & quote
>
>
> because " sign in query means the start of a phrase; for
> example "Lucene
> User" query is not equal to Lucene User.
>
> query parser thinks that after a " sign there is an other " ; EOF
> encountered without any closing "
>
> peter
>
> > -----Original Message-----
> > From: a person [mailto:a.person@eudoramail.com]
> > Sent: Wednesday, July 03, 2002 5:28 PM
> > To: lucene-user@jakarta.apache.org
> > Subject: exception with parse & quote
> >
> >
> > All luceners...
> >
> > this.....
> >
> > String queryStr="9\" Speaker";
> > logger.debug("query string...queryStr=" + queryStr);
> > Analyzer analyzer = new StandardAnalyzer();
> > Query query = QueryParser.parse(queryStr, "", analyzer);
> >
> >
> > produces....
> >
> > query string...queryStr=9" Speaker
> > org.apache.lucene.queryParser.TokenMgrError: Lexical error at
> > line 1, column 11. Encountered: <EOF> after : "\" Speaker"
> > at
> > org.apache.lucene.queryParser.QueryParserTokenManager.getNextT
> > oken(Unknown Source)
> > at
> > org.apache.lucene.queryParser.QueryParser.jj_scan_token(Unknow
> > n Source)
> > at
> > org.apache.lucene.queryParser.QueryParser.jj_3_1(Unknown Source)
> > at
> > org.apache.lucene.queryParser.QueryParser.jj_2_1(Unknown Source)
> > at
> > org.apache.lucene.queryParser.QueryParser.Clause(Unknown Source)
> > at
> > org.apache.lucene.queryParser.QueryParser.Query(Unknown Source)
> > at
> > org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)
> > at
> > org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)
> >
> >
> > but this works.....
> >
> > String queryStr="9 Speaker";
> >
> >
> >
> > shouldn't.....
> >
> >
> >
> > shouldn't this behave the same if I call
> > analyzer.tokenStream directly (which correctly strips the " out ?
> >
> >
> > thanks for any help....
> >
> >
> >
> >
> >
> >
> > Join 18 million Eudora users by signing up for a free Eudora
> > Web-Mail account at http://www.eudoramail.com
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:lucene-user-help@jakarta.apache.org>
> >
> >
>
> --
> To unsubscribe, e-mail:
> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:lucene-user-help@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:
> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:lucene-user-help@jakarta.apache.org>
>
>

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
RE: exception with parse & quote [ In reply to ]
Isn't that what the escape character is for?
Try getting the latest version of Lucene (1.2) and using the \
character for escaping other special characters.

Otis


--- Philip-Allen <PAllen2@OfficeDepot.com> wrote:
>
> Thanks...
> Any easy way around this problem? Because " in this case means inch
> and is
> not really intended to be searched on....
> Is the best way to handle this then to use the analyzer.tokenStream
> directly
> to strip the " before parsing?
>
> If so, what is the point of parsing?
>
>
> -----Original Message-----
> From: Halácsy Péter [mailto:halacsy.peter@axelero.com]
> Sent: Wednesday, July 03, 2002 11:37 AM
> To: Lucene Users List
> Subject: RE: exception with parse & quote
>
>
> because " sign in query means the start of a phrase; for example
> "Lucene
> User" query is not equal to Lucene User.
>
> query parser thinks that after a " sign there is an other " ; EOF
> encountered without any closing "
>
> peter
>
> > -----Original Message-----
> > From: a person [mailto:a.person@eudoramail.com]
> > Sent: Wednesday, July 03, 2002 5:28 PM
> > To: lucene-user@jakarta.apache.org
> > Subject: exception with parse & quote
> >
> >
> > All luceners...
> >
> > this.....
> >
> > String queryStr="9\" Speaker";
> > logger.debug("query string...queryStr=" + queryStr);
> > Analyzer analyzer = new StandardAnalyzer();
> > Query query = QueryParser.parse(queryStr, "", analyzer);
> >
> >
> > produces....
> >
> > query string...queryStr=9" Speaker
> > org.apache.lucene.queryParser.TokenMgrError: Lexical error at
> > line 1, column 11. Encountered: <EOF> after : "\" Speaker"
> > at
> > org.apache.lucene.queryParser.QueryParserTokenManager.getNextT
> > oken(Unknown Source)
> > at
> > org.apache.lucene.queryParser.QueryParser.jj_scan_token(Unknow
> > n Source)
> > at
> > org.apache.lucene.queryParser.QueryParser.jj_3_1(Unknown Source)
> > at
> > org.apache.lucene.queryParser.QueryParser.jj_2_1(Unknown Source)
> > at
> > org.apache.lucene.queryParser.QueryParser.Clause(Unknown Source)
> > at
> > org.apache.lucene.queryParser.QueryParser.Query(Unknown Source)
> > at
> > org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)
> > at
> > org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)
> >
> >
> > but this works.....
> >
> > String queryStr="9 Speaker";
> >
> >
> >
> > shouldn't.....
> >
> >
> >
> > shouldn't this behave the same if I call
> > analyzer.tokenStream directly (which correctly strips the " out ?
> >
> >
> > thanks for any help....
> >
> >
> >
> >
> >
> >
> > Join 18 million Eudora users by signing up for a free Eudora
> > Web-Mail account at http://www.eudoramail.com
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:lucene-user-help@jakarta.apache.org>
> >
> >
>
> --
> To unsubscribe, e-mail:
> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:lucene-user-help@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:
> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:lucene-user-help@jakarta.apache.org>
>


__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
RE: exception with parse & quote [ In reply to ]
Don't you need three \ characters to get Lucene to escape it. With only
one \ you are just escaping the " so that Java doesn't see it as closing
the string literal:

String s = "9\" Speaker"; // 9" Speaker - Lucene thinks it starts a
phrase
String s = "9\\\" Speaker"; // 9\" Speaker - The " is escaped when
passed to Lucene

Darran

> -----Original Message-----
> From: Otis Gospodnetic [mailto:otis_gospodnetic@yahoo.com]
> Sent: 03 July 2002 16:56
> To: Lucene Users List
> Subject: RE: exception with parse & quote
>
>
> Isn't that what the escape character is for?
> Try getting the latest version of Lucene (1.2) and using the
> \ character for escaping other special characters.
>
> Otis
>
>
> --- Philip-Allen <PAllen2@OfficeDepot.com> wrote:
> >
> > Thanks...
> > Any easy way around this problem? Because " in this case means inch
> > and is not really intended to be searched on....
> > Is the best way to handle this then to use the analyzer.tokenStream
> > directly
> > to strip the " before parsing?
> >
> > If so, what is the point of parsing?
> >
> >
> > -----Original Message-----
> > From: Halácsy Péter [mailto:halacsy.peter@axelero.com]
> > Sent: Wednesday, July 03, 2002 11:37 AM
> > To: Lucene Users List
> > Subject: RE: exception with parse & quote
> >
> >
> > because " sign in query means the start of a phrase; for example
> > "Lucene User" query is not equal to Lucene User.
> >
> > query parser thinks that after a " sign there is an other " ; EOF
> > encountered without any closing "
> >
> > peter
> >
> > > -----Original Message-----
> > > From: a person [mailto:a.person@eudoramail.com]
> > > Sent: Wednesday, July 03, 2002 5:28 PM
> > > To: lucene-user@jakarta.apache.org
> > > Subject: exception with parse & quote
> > >
> > >
> > > All luceners...
> > >
> > > this.....
> > >
> > > String queryStr="9\" Speaker";
> > > logger.debug("query string...queryStr=" + queryStr); Analyzer
> > > analyzer = new StandardAnalyzer(); Query query =
> > > QueryParser.parse(queryStr, "", analyzer);
> > >
> > >
> > > produces....
> > >
> > > query string...queryStr=9" Speaker
> > > org.apache.lucene.queryParser.TokenMgrError: Lexical error at
> > > line 1, column 11. Encountered: <EOF> after : "\" Speaker"
> > > at
> > > org.apache.lucene.queryParser.QueryParserTokenManager.getNextT
> > > oken(Unknown Source)
> > > at
> > > org.apache.lucene.queryParser.QueryParser.jj_scan_token(Unknow
> > > n Source)
> > > at
> > > org.apache.lucene.queryParser.QueryParser.jj_3_1(Unknown Source)
> > > at
> > > org.apache.lucene.queryParser.QueryParser.jj_2_1(Unknown Source)
> > > at
> > > org.apache.lucene.queryParser.QueryParser.Clause(Unknown Source)
> > > at
> > > org.apache.lucene.queryParser.QueryParser.Query(Unknown Source)
> > > at
> > > org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)
> > > at
> > > org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)
> > >
> > >
> > > but this works.....
> > >
> > > String queryStr="9 Speaker";
> > >
> > >
> > >
> > > shouldn't.....
> > >
> > >
> > >
> > > shouldn't this behave the same if I call
> > > analyzer.tokenStream directly (which correctly strips the " out ?
> > >
> > >
> > > thanks for any help....
> > >
> > >
> > >
> > >
> > >
> > >
> > > Join 18 million Eudora users by signing up for a free Eudora
> > > Web-Mail account at http://www.eudoramail.com
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> > > <mailto:lucene-user-help@jakarta.apache.org>
> > >
> > >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:lucene-user-help@jakarta.apache.org>
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:lucene-user-help@jakarta.apache.org>
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com
>
> --
> To unsubscribe, e-mail:
> <mailto:lucene-user-> unsubscribe@jakarta.apache.org>
> For
> additional commands,
> e-mail: <mailto:lucene-user-help@jakarta.apache.org>
>
>



--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
RE: exception with parse & quote [ In reply to ]
Tried it doesn't work....


DEBUG (main) [lucene.LuceneTest] paTokenizer3...queryStr=9\" Speaker
org.apache.lucene.queryParser.TokenMgrError: Lexical error at line 1, column 12. Encountered: <EOF> after : "\" Speaker"



The problem is also that if I am accepting this input from a user I will have to intercept anyway then...







--

On Wed, 3 Jul 2002 17:26:59 Darran Shepherd wrote:
>Don't you need three \ characters to get Lucene to escape it. With only
>one \ you are just escaping the " so that Java doesn't see it as closing
>the string literal:
>
>String s = "9\" Speaker"; // 9" Speaker - Lucene thinks it starts a
>phrase
>String s = "9\\\" Speaker"; // 9\" Speaker - The " is escaped when
>passed to Lucene
>
>Darran
>
>> -----Original Message-----
>> From: Otis Gospodnetic [mailto:otis_gospodnetic@yahoo.com]
>> Sent: 03 July 2002 16:56
>> To: Lucene Users List
>> Subject: RE: exception with parse & quote
>>
>>
>> Isn't that what the escape character is for?
>> Try getting the latest version of Lucene (1.2) and using the
>> \ character for escaping other special characters.
>>
>> Otis
>>
>>
>> --- Philip-Allen <PAllen2@OfficeDepot.com> wrote:
>> >
>> > Thanks...
>> > Any easy way around this problem? Because " in this case means inch
>> > and is not really intended to be searched on....
>> > Is the best way to handle this then to use the analyzer.tokenStream
>> > directly
>> > to strip the " before parsing?
>> >
>> > If so, what is the point of parsing?
>> >
>> >
>> > -----Original Message-----
>> > From: Halacsy Piter [mailto:halacsy.peter@axelero.com]
>> > Sent: Wednesday, July 03, 2002 11:37 AM
>> > To: Lucene Users List
>> > Subject: RE: exception with parse & quote
>> >
>> >
>> > because " sign in query means the start of a phrase; for example
>> > "Lucene User" query is not equal to Lucene User.
>> >
>> > query parser thinks that after a " sign there is an other " ; EOF
>> > encountered without any closing "
>> >
>> > peter
>> >
>> > > -----Original Message-----
>> > > From: a person [mailto:a.person@eudoramail.com]
>> > > Sent: Wednesday, July 03, 2002 5:28 PM
>> > > To: lucene-user@jakarta.apache.org
>> > > Subject: exception with parse & quote
>> > >
>> > >
>> > > All luceners...
>> > >
>> > > this.....
>> > >
>> > > String queryStr="9\" Speaker";
>> > > logger.debug("query string...queryStr=" + queryStr); Analyzer
>> > > analyzer = new StandardAnalyzer(); Query query =
>> > > QueryParser.parse(queryStr, "", analyzer);
>> > >
>> > >
>> > > produces....
>> > >
>> > > query string...queryStr=9" Speaker
>> > > org.apache.lucene.queryParser.TokenMgrError: Lexical error at
>> > > line 1, column 11. Encountered: <EOF> after : "\" Speaker"
>> > > at
>> > > org.apache.lucene.queryParser.QueryParserTokenManager.getNextT
>> > > oken(Unknown Source)
>> > > at
>> > > org.apache.lucene.queryParser.QueryParser.jj_scan_token(Unknow
>> > > n Source)
>> > > at
>> > > org.apache.lucene.queryParser.QueryParser.jj_3_1(Unknown Source)
>> > > at
>> > > org.apache.lucene.queryParser.QueryParser.jj_2_1(Unknown Source)
>> > > at
>> > > org.apache.lucene.queryParser.QueryParser.Clause(Unknown Source)
>> > > at
>> > > org.apache.lucene.queryParser.QueryParser.Query(Unknown Source)
>> > > at
>> > > org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)
>> > > at
>> > > org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)
>> > >
>> > >
>> > > but this works.....
>> > >
>> > > String queryStr="9 Speaker";
>> > >
>> > >
>> > >
>> > > shouldn't.....
>> > >
>> > >
>> > >
>> > > shouldn't this behave the same if I call
>> > > analyzer.tokenStream directly (which correctly strips the " out ?
>> > >
>> > >
>> > > thanks for any help....
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > Join 18 million Eudora users by signing up for a free Eudora
>> > > Web-Mail account at http://www.eudoramail.com
>> > >
>> > > --
>> > > To unsubscribe, e-mail:
>> > > <mailto:lucene-user-unsubscribe@jakarta.apache.org>
>> > > For additional commands, e-mail:
>> > > <mailto:lucene-user-help@jakarta.apache.org>
>> > >
>> > >
>> >
>> > --
>> > To unsubscribe, e-mail:
>> > <mailto:lucene-user-unsubscribe@jakarta.apache.org>
>> > For additional commands, e-mail:
>> > <mailto:lucene-user-help@jakarta.apache.org>
>> >
>> > --
>> > To unsubscribe, e-mail:
>> > <mailto:lucene-user-unsubscribe@jakarta.apache.org>
>> > For additional commands, e-mail:
>> > <mailto:lucene-user-help@jakarta.apache.org>
>> >
>>
>>
>> __________________________________________________
>> Do You Yahoo!?
>> Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com
>>
>> --
>> To unsubscribe, e-mail:
>> <mailto:lucene-user-> unsubscribe@jakarta.apache.org>
>> For
>> additional commands,
>> e-mail: <mailto:lucene-user-help@jakarta.apache.org>
>>
>>
>
>
>
>--
>To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
>
>


Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
RE: exception with parse & quote [ In reply to ]
I thought of that, but if that is the case I would like to just use analyzer.tokenStream directly and get the finished query strings BUT then I don't get an oportunity to create a QUERY object as I believe that only comes from QueryParser, which I wouldn't need because I have already analyzed...what am I missing?


--

On Wed, 3 Jul 2002 17:45:57 Halacsy Piter wrote:
>I don't know. Maybe you could replace " chars in in the text before indexing and in incoming query
>
>or write your own analyzer?
>
>peter
>
>
>> -----Original Message-----
>> From: Philip-Allen [mailto:PAllen2@OfficeDepot.com]
>> Sent: Wednesday, July 03, 2002 5:42 PM
>> To: Lucene Users List
>> Subject: RE: exception with parse & quote
>>
>>
>>
>> Thanks...
>> Any easy way around this problem? Because " in this case
>> means inch and is
>> not really intended to be searched on....
>> Is the best way to handle this then to use the
>> analyzer.tokenStream directly
>> to strip the " before parsing?
>>
>> If so, what is the point of parsing?
>>
>>
>> -----Original Message-----
>> From: Halacsy Piter [mailto:halacsy.peter@axelero.com]
>> Sent: Wednesday, July 03, 2002 11:37 AM
>> To: Lucene Users List
>> Subject: RE: exception with parse & quote
>>
>>
>> because " sign in query means the start of a phrase; for
>> example "Lucene
>> User" query is not equal to Lucene User.
>>
>> query parser thinks that after a " sign there is an other " ; EOF
>> encountered without any closing "
>>
>> peter
>>
>> > -----Original Message-----
>> > From: a person [mailto:a.person@eudoramail.com]
>> > Sent: Wednesday, July 03, 2002 5:28 PM
>> > To: lucene-user@jakarta.apache.org
>> > Subject: exception with parse & quote
>> >
>> >
>> > All luceners...
>> >
>> > this.....
>> >
>> > String queryStr="9\" Speaker";
>> > logger.debug("query string...queryStr=" + queryStr);
>> > Analyzer analyzer = new StandardAnalyzer();
>> > Query query = QueryParser.parse(queryStr, "", analyzer);
>> >
>> >
>> > produces....
>> >
>> > query string...queryStr=9" Speaker
>> > org.apache.lucene.queryParser.TokenMgrError: Lexical error at
>> > line 1, column 11. Encountered: <EOF> after : "\" Speaker"
>> > at
>> > org.apache.lucene.queryParser.QueryParserTokenManager.getNextT
>> > oken(Unknown Source)
>> > at
>> > org.apache.lucene.queryParser.QueryParser.jj_scan_token(Unknow
>> > n Source)
>> > at
>> > org.apache.lucene.queryParser.QueryParser.jj_3_1(Unknown Source)
>> > at
>> > org.apache.lucene.queryParser.QueryParser.jj_2_1(Unknown Source)
>> > at
>> > org.apache.lucene.queryParser.QueryParser.Clause(Unknown Source)
>> > at
>> > org.apache.lucene.queryParser.QueryParser.Query(Unknown Source)
>> > at
>> > org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)
>> > at
>> > org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)
>> >
>> >
>> > but this works.....
>> >
>> > String queryStr="9 Speaker";
>> >
>> >
>> >
>> > shouldn't.....
>> >
>> >
>> >
>> > shouldn't this behave the same if I call
>> > analyzer.tokenStream directly (which correctly strips the " out ?
>> >
>> >
>> > thanks for any help....
>> >
>> >
>> >
>> >
>> >
>> >
>> > Join 18 million Eudora users by signing up for a free Eudora
>> > Web-Mail account at http://www.eudoramail.com
>> >
>> > --
>> > To unsubscribe, e-mail:
>> > <mailto:lucene-user-unsubscribe@jakarta.apache.org>
>> > For additional commands, e-mail:
>> > <mailto:lucene-user-help@jakarta.apache.org>
>> >
>> >
>>
>> --
>> To unsubscribe, e-mail:
>> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail:
>> <mailto:lucene-user-help@jakarta.apache.org>
>>
>> --
>> To unsubscribe, e-mail:
>> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail:
>> <mailto:lucene-user-help@jakarta.apache.org>
>>
>>
>
>--
>To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
>
>


Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>