Re: HTTP Status 400 - org.apache.lucene.queryParser.ParseException
There's nothing that I know of that would accomplish this, sorry... Best Erick On Tue, Jan 18, 2011 at 11:22 PM, kun xiong xiongku...@gmail.com wrote: Hi Erick, Thanks for the fast reply. I kind of figured it was not supposed to be that way. But it would have some benefits when we need migrate from Lucene to Solr. We don't have to rewrite the build query part, right. Is there any parser can do that? 2011/1/18 Ahmet Arslan iori...@yahoo.com what's the alternative? q=kfc+mdcdefType=dismaxmm=1qf=I_NAME_ENUM See more: http://wiki.apache.org/solr/DisMaxQParserPlugin
Fwd: HTTP Status 400 - org.apache.lucene.queryParser.ParseException
-- Forwarded message -- From: kun xiong xiongku...@gmail.com Date: 2011/1/18 Subject: HTTP Status 400 - org.apache.lucene.queryParser.ParseException To: solr-user@lucene.apache.org Hi all, I got a ParseException when I query solr with Lucene BooleanQuery expression (toString()). I use the default parser : LuceneQParserPlugin,which should support whole lucene syntax,right? Java Code: BooleanQuery bq = new BooleanQuery(); Query q1 = new TermQuery(new Term(I_NAME_ENUM, KFC)); Query q2 = new TermQuery(new Term(I_NAME_ENUM, MCD)); bq.add(q1, Occur.SHOULD); bq.add(q2, Occur.SHOULD); bq.setMinimumNumberShouldMatch(1); String solrQuery = bq.toString(); query string is : q=(I_NAME_ENUM:kfc I_NAME_ENUM:best western)~1 Exceptions : *message* *org.apache.lucene.queryParser.ParseException: Cannot parse '(I_NAME_ENUM:kfc I_NAME_ENUM:best western)~1': Encountered FUZZY_SLOP ~1 at line 1, column 42. Was expecting one of: EOF AND ... OR ... NOT ... + ... - ... ( ... * ... ^ ... QUOTED ... TERM ... PREFIXTERM ... WILDTERM ... [ ... { ... NUMBER ... * *description* *The request sent by the client was syntactically incorrect (org.apache.lucene.queryParser.ParseException: Cannot parse '(I_NAME_ENUM:kfc I_NAME_ENUM:best western)~1': Encountered FUZZY_SLOP ~1 at line 1, column 42. Was expecting one of: EOF AND ... OR ... NOT ... + ... - ... ( ... * ... ^ ... QUOTED ... TERM ... PREFIXTERM ... WILDTERM ... [ ... { ... NUMBER ... ).* * * Anyone could help? Thanks Kun * *
HTTP Status 400 - org.apache.lucene.queryParser.ParseException
Hi all, I got a ParseException when I query solr with Lucene BooleanQuery expression (toString()). I use the default parser : LuceneQParserPlugin,which should support whole lucene syntax,right? Java Code: BooleanQuery bq = new BooleanQuery(); Query q1 = new TermQuery(new Term(I_NAME_ENUM, KFC)); Query q2 = new TermQuery(new Term(I_NAME_ENUM, MCD)); bq.add(q1, Occur.SHOULD); bq.add(q2, Occur.SHOULD); bq.setMinimumNumberShouldMatch(1); String solrQuery = bq.toString(); query string is : q=(I_NAME_ENUM:kfc I_NAME_ENUM:best western)~1 Exceptions : *message* *org.apache.lucene.queryParser.ParseException: Cannot parse '(I_NAME_ENUM:kfc I_NAME_ENUM:best western)~1': Encountered FUZZY_SLOP ~1 at line 1, column 42. Was expecting one of: EOF AND ... OR ... NOT ... + ... - ... ( ... * ... ^ ... QUOTED ... TERM ... PREFIXTERM ... WILDTERM ... [ ... { ... NUMBER ... * *description* *The request sent by the client was syntactically incorrect (org.apache.lucene.queryParser.ParseException: Cannot parse '(I_NAME_ENUM:kfc I_NAME_ENUM:best western)~1': Encountered FUZZY_SLOP ~1 at line 1, column 42. Was expecting one of: EOF AND ... OR ... NOT ... + ... - ... ( ... * ... ^ ... QUOTED ... TERM ... PREFIXTERM ... WILDTERM ... [ ... { ... NUMBER ... ).* * * Anyone could help? Thanks Kun * *
Re: HTTP Status 400 - org.apache.lucene.queryParser.ParseException
Why do you want to do this? Because toString has never been guaranteed to be re-parsable, even in Lucene, so it's not surprising that taking a Lucene toString() clause and submitting it to Solr doesn't work. Best Erick On Tue, Jan 18, 2011 at 4:49 AM, kun xiong xiongku...@gmail.com wrote: -- Forwarded message -- From: kun xiong xiongku...@gmail.com Date: 2011/1/18 Subject: HTTP Status 400 - org.apache.lucene.queryParser.ParseException To: solr-user@lucene.apache.org Hi all, I got a ParseException when I query solr with Lucene BooleanQuery expression (toString()). I use the default parser : LuceneQParserPlugin,which should support whole lucene syntax,right? Java Code: BooleanQuery bq = new BooleanQuery(); Query q1 = new TermQuery(new Term(I_NAME_ENUM, KFC)); Query q2 = new TermQuery(new Term(I_NAME_ENUM, MCD)); bq.add(q1, Occur.SHOULD); bq.add(q2, Occur.SHOULD); bq.setMinimumNumberShouldMatch(1); String solrQuery = bq.toString(); query string is : q=(I_NAME_ENUM:kfc I_NAME_ENUM:best western)~1 Exceptions : *message* *org.apache.lucene.queryParser.ParseException: Cannot parse '(I_NAME_ENUM:kfc I_NAME_ENUM:best western)~1': Encountered FUZZY_SLOP ~1 at line 1, column 42. Was expecting one of: EOF AND ... OR ... NOT ... + ... - ... ( ... * ... ^ ... QUOTED ... TERM ... PREFIXTERM ... WILDTERM ... [ ... { ... NUMBER ... * *description* *The request sent by the client was syntactically incorrect (org.apache.lucene.queryParser.ParseException: Cannot parse '(I_NAME_ENUM:kfc I_NAME_ENUM:best western)~1': Encountered FUZZY_SLOP ~1 at line 1, column 42. Was expecting one of: EOF AND ... OR ... NOT ... + ... - ... ( ... * ... ^ ... QUOTED ... TERM ... PREFIXTERM ... WILDTERM ... [ ... { ... NUMBER ... ).* * * Anyone could help? Thanks Kun * *
Re: HTTP Status 400 - org.apache.lucene.queryParser.ParseException
what's the alternative? --- On Tue, 1/18/11, Erick Erickson erickerick...@gmail.com wrote: From: Erick Erickson erickerick...@gmail.com Subject: Re: HTTP Status 400 - org.apache.lucene.queryParser.ParseException To: solr-user@lucene.apache.org Date: Tuesday, January 18, 2011, 5:24 AM Why do you want to do this? Because toString has never been guaranteed to be re-parsable, even in Lucene, so it's not surprising that taking a Lucene toString() clause and submitting it to Solr doesn't work. Best Erick On Tue, Jan 18, 2011 at 4:49 AM, kun xiong xiongku...@gmail.com wrote: -- Forwarded message -- From: kun xiong xiongku...@gmail.com Date: 2011/1/18 Subject: HTTP Status 400 - org.apache.lucene.queryParser.ParseException To: solr-user@lucene.apache.org Hi all, I got a ParseException when I query solr with Lucene BooleanQuery expression (toString()). I use the default parser : LuceneQParserPlugin,which should support whole lucene syntax,right? Java Code: BooleanQuery bq = new BooleanQuery(); Query q1 = new TermQuery(new Term(I_NAME_ENUM, KFC)); Query q2 = new TermQuery(new Term(I_NAME_ENUM, MCD)); bq.add(q1, Occur.SHOULD); bq.add(q2, Occur.SHOULD); bq.setMinimumNumberShouldMatch(1); String solrQuery = bq.toString(); query string is : q=(I_NAME_ENUM:kfc I_NAME_ENUM:best western)~1 Exceptions : *message* *org.apache.lucene.queryParser.ParseException: Cannot parse '(I_NAME_ENUM:kfc I_NAME_ENUM:best western)~1': Encountered FUZZY_SLOP ~1 at line 1, column 42. Was expecting one of: EOF AND ... OR ... NOT ... + ... - ... ( ... * ... ^ ... QUOTED ... TERM ... PREFIXTERM ... WILDTERM ... [ ... { ... NUMBER ... * *description* *The request sent by the client was syntactically incorrect (org.apache.lucene.queryParser.ParseException: Cannot parse '(I_NAME_ENUM:kfc I_NAME_ENUM:best western)~1': Encountered FUZZY_SLOP ~1 at line 1, column 42. Was expecting one of: EOF AND ... OR ... NOT ... + ... - ... ( ... * ... ^ ... QUOTED ... TERM ... PREFIXTERM ... WILDTERM ... [ ... { ... NUMBER ... ).* * * Anyone could help? Thanks Kun * *
Re: HTTP Status 400 - org.apache.lucene.queryParser.ParseException
what's the alternative? q=kfc+mdcdefType=dismaxmm=1qf=I_NAME_ENUM See more: http://wiki.apache.org/solr/DisMaxQParserPlugin
Re: HTTP Status 400 - org.apache.lucene.queryParser.ParseException
Hi Erick, Thanks for the fast reply. I kind of figured it was not supposed to be that way. But it would have some benefits when we need migrate from Lucene to Solr. We don't have to rewrite the build query part, right. Is there any parser can do that? 2011/1/18 Ahmet Arslan iori...@yahoo.com what's the alternative? q=kfc+mdcdefType=dismaxmm=1qf=I_NAME_ENUM See more: http://wiki.apache.org/solr/DisMaxQParserPlugin