You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by "Zhang, Lisheng" <Li...@BroadVision.com> on 2009/06/02 07:12:59 UTC

Possible bug in QueryParser when using CJKAnalyzer (lucene 2.4.1)

Hi,

When I use lucene 2.4.1 QueryParser with CJKAnalyzer, somehow
it always generates an extra space, for example, if the input is "ABC",
the query would be:

myfield"AB BC "  // should be myfield:"AB BC"

If I create PhraseQuery directly it does work. From Luke I know indexing
works OK. In lucene 1.4.3 we donot have this issue. I diffed CJKAnalyzer
code and it seems to be the same, so I guess it could be a QueryParser
bug?

Thanks very much for helps, Lisheng

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


RE: Possible bug in QueryParser when using CJKAnalyzer (lucene 2.4.1)

Posted by "Zhang, Lisheng" <Li...@BroadVision.com>.
Thanks very much!!!

-----Original Message-----
From: Otis Gospodnetic [mailto:otis_gospodnetic@yahoo.com]
Sent: Tuesday, June 02, 2009 9:42 AM
To: java-user@lucene.apache.org
Subject: Re: Possible bug in QueryParser when using CJKAnalyzer (lucene
2.4.1)



Lisheng,

A patch file is just a text file, so you will be able to open it with any text editor.
But you'll need to apply it from the command line or from an IDE - http://www.google.com/search?hl=en&q=how+to+apply+a+patch

Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



----- Original Message ----
> From: "Zhang, Lisheng" <Li...@BroadVision.com>
> To: java-user@lucene.apache.org
> Sent: Tuesday, June 2, 2009 12:35:15 PM
> Subject: RE: Possible bug in QueryParser when using CJKAnalyzer (lucene 2.4.1)
> 
> Thanks very much, this could be the same issue, but somehow
> I could not open the *.patch file, maybe that's sth trivial,
> is there a *.patch file related tools? I really appreciate
> a simple pointer.
> 
> Best regards, Lisheng
> 
> 
> 
> -----Original Message-----
> From: Koji Sekiguchi [mailto:koji@r.email.ne.jp]
> Sent: Monday, June 01, 2009 10:39 PM
> To: java-user@lucene.apache.org
> Subject: Re: Possible bug in QueryParser when using CJKAnalyzer (lucene
> 2.4.1)
> 
> 
> I'm not sure this is the same case, but there is a report and patch for 
> CJKTokenizer in JARA:
> 
> https://issues.apache.org/jira/browse/LUCENE-973
> 
> Koji
> 
> 
> Zhang, Lisheng wrote:
> > Hi,
> >
> > When I use lucene 2.4.1 QueryParser with CJKAnalyzer, somehow
> > it always generates an extra space, for example, if the input is "ABC",
> > the query would be:
> >
> > myfield"AB BC "  // should be myfield:"AB BC"
> >
> > If I create PhraseQuery directly it does work. From Luke I know indexing
> > works OK. In lucene 1.4.3 we donot have this issue. I diffed CJKAnalyzer
> > code and it seems to be the same, so I guess it could be a QueryParser
> > bug?
> >
> > Thanks very much for helps, Lisheng
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
> >  
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Possible bug in QueryParser when using CJKAnalyzer (lucene 2.4.1)

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Lisheng,

A patch file is just a text file, so you will be able to open it with any text editor.
But you'll need to apply it from the command line or from an IDE - http://www.google.com/search?hl=en&q=how+to+apply+a+patch

Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



----- Original Message ----
> From: "Zhang, Lisheng" <Li...@BroadVision.com>
> To: java-user@lucene.apache.org
> Sent: Tuesday, June 2, 2009 12:35:15 PM
> Subject: RE: Possible bug in QueryParser when using CJKAnalyzer (lucene 2.4.1)
> 
> Thanks very much, this could be the same issue, but somehow
> I could not open the *.patch file, maybe that's sth trivial,
> is there a *.patch file related tools? I really appreciate
> a simple pointer.
> 
> Best regards, Lisheng
> 
> 
> 
> -----Original Message-----
> From: Koji Sekiguchi [mailto:koji@r.email.ne.jp]
> Sent: Monday, June 01, 2009 10:39 PM
> To: java-user@lucene.apache.org
> Subject: Re: Possible bug in QueryParser when using CJKAnalyzer (lucene
> 2.4.1)
> 
> 
> I'm not sure this is the same case, but there is a report and patch for 
> CJKTokenizer in JARA:
> 
> https://issues.apache.org/jira/browse/LUCENE-973
> 
> Koji
> 
> 
> Zhang, Lisheng wrote:
> > Hi,
> >
> > When I use lucene 2.4.1 QueryParser with CJKAnalyzer, somehow
> > it always generates an extra space, for example, if the input is "ABC",
> > the query would be:
> >
> > myfield"AB BC "  // should be myfield:"AB BC"
> >
> > If I create PhraseQuery directly it does work. From Luke I know indexing
> > works OK. In lucene 1.4.3 we donot have this issue. I diffed CJKAnalyzer
> > code and it seems to be the same, so I guess it could be a QueryParser
> > bug?
> >
> > Thanks very much for helps, Lisheng
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
> >  
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


RE: Possible bug in QueryParser when using CJKAnalyzer (lucene 2.4.1)

Posted by "Zhang, Lisheng" <Li...@BroadVision.com>.
Thanks very much, this could be the same issue, but somehow
I could not open the *.patch file, maybe that's sth trivial,
is there a *.patch file related tools? I really appreciate
a simple pointer.

Best regards, Lisheng



-----Original Message-----
From: Koji Sekiguchi [mailto:koji@r.email.ne.jp]
Sent: Monday, June 01, 2009 10:39 PM
To: java-user@lucene.apache.org
Subject: Re: Possible bug in QueryParser when using CJKAnalyzer (lucene
2.4.1)


I'm not sure this is the same case, but there is a report and patch for 
CJKTokenizer in JARA:

https://issues.apache.org/jira/browse/LUCENE-973

Koji


Zhang, Lisheng wrote:
> Hi,
>
> When I use lucene 2.4.1 QueryParser with CJKAnalyzer, somehow
> it always generates an extra space, for example, if the input is "ABC",
> the query would be:
>
> myfield"AB BC "  // should be myfield:"AB BC"
>
> If I create PhraseQuery directly it does work. From Luke I know indexing
> works OK. In lucene 1.4.3 we donot have this issue. I diffed CJKAnalyzer
> code and it seems to be the same, so I guess it could be a QueryParser
> bug?
>
> Thanks very much for helps, Lisheng
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Possible bug in QueryParser when using CJKAnalyzer (lucene 2.4.1)

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
I'm not sure this is the same case, but there is a report and patch for 
CJKTokenizer in JARA:

https://issues.apache.org/jira/browse/LUCENE-973

Koji


Zhang, Lisheng wrote:
> Hi,
>
> When I use lucene 2.4.1 QueryParser with CJKAnalyzer, somehow
> it always generates an extra space, for example, if the input is "ABC",
> the query would be:
>
> myfield"AB BC "  // should be myfield:"AB BC"
>
> If I create PhraseQuery directly it does work. From Luke I know indexing
> works OK. In lucene 1.4.3 we donot have this issue. I diffed CJKAnalyzer
> code and it seems to be the same, so I guess it could be a QueryParser
> bug?
>
> Thanks very much for helps, Lisheng
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org