You may try this

(({!join from=inner_id to=outer_id fromIndex=othercore v=$joinQuery}

And pass another parameter joinQuery=(city:"Stara Zagora" AND prod:214)

Thanks,
Kranti K. Parisa
http://www.linkedin.com/in/krantiparisa



On Fri, Mar 21, 2014 at 4:47 AM, Marcin Rzewucki <mrzewu...@gmail.com>wrote:

> Hi,
>
> Erick, I do not get your point. What kind of servlet container settings do
> you mean and why do you think they might be related ? I'm using Jetty and
> never set any limit for packet size. My query does not work only in case of
> double quotes and space between words. Why? It works in other cases as
> described in my first mail.
>
> Cheers.
>
>
>
> On 20 March 2014 15:23, Erick Erickson <erickerick...@gmail.com> wrote:
>
> > Well, the error message really looks like your input is
> > getting chopped off.
> >
> > It's vaguely possible that you have some super-low limit
> > in your servlet container configuration that is only letting very
> > small packets through.
> >
> > What I'd do is look in the Solr log file to see exactly what
> > is coming through. Because regardless of what you _think_
> > you're sending, it _really_ looks like Solr is getting the fq
> > clause with something that breaks it up. So I'd like to
> > absolutely nail that as being wrong before speculating.
> >
> > Because I can cut/paste your fq clause just fine. Of course
> > it fails because I don't have the other core defined, but that
> > means the query has made it through query parsing while
> > yours hasn't in your setup.
> >
> > Best,
> > Erick
> >
> > On Thu, Mar 20, 2014 at 2:19 AM, Marcin Rzewucki <mrzewu...@gmail.com>
> > wrote:
> > > Nope. There is no line break in the string and it is not feed from
> file.
> > > What else could be the reason ?
> > >
> > >
> > >
> > > On 19 March 2014 17:57, Erick Erickson <erickerick...@gmail.com>
> wrote:
> > >
> > >> It looks to me like you're feeding this from some
> > >> kind of text file and you really _do_ have a
> > >> line break after "Stara
> > >>
> > >> Or have a line break in the string you paste into the URL
> > >> or something similar.
> > >>
> > >> Kind of shooting in the dark though.
> > >>
> > >> Erick
> > >>
> > >> On Wed, Mar 19, 2014 at 8:48 AM, Marcin Rzewucki <mrzewu...@gmail.com
> >
> > >> wrote:
> > >> > Hi,
> > >> >
> > >> > I have the following issue with join query parser and filter query.
> > For
> > >> > such query:
> > >> >
> > >> > <str name="q">*:*</str>
> > >> > <str name="fq">
> > >> > (({!join from=inner_id to=outer_id fromIndex=othercore}city:"Stara
> > >> > Zagora")) AND (prod:214)
> > >> > </str>
> > >> >
> > >> > I got error:
> > >> > <lst name="error">
> > >> > <str name="msg">
> > >> > org.apache.solr.search.SyntaxError: Cannot parse 'city:"Stara':
> > Lexical
> > >> > error at line 1, column 12. Encountered: <EOF> after : "\"Stara"
> > >> > </str>
> > >> > <int name="code">400</int>
> > >> > </lst>
> > >> >
> > >> > Stack:
> > >> > DEBUG - 2014-03-19 13:35:20.825;
> > >> org.eclipse.jetty.servlet.ServletHandler;
> > >> > chain=SolrRequestFilter->default
> > >> > DEBUG - 2014-03-19 13:35:20.826;
> > >> > org.eclipse.jetty.servlet.ServletHandler$CachedChain; call filter
> > >> > SolrRequestFilter
> > >> > ERROR - 2014-03-19 13:35:20.828;
> org.apache.solr.common.SolrException;
> > >> > org.apache.solr.common.SolrException:
> > org.apache.solr.search.SyntaxError:
> > >> > Cannot parse 'city:"Stara': Lexical error at line 1, column 12.  E
> > >> > ncountered: <EOF> after : "\"Stara"
> > >> >         at
> > >> >
> > >>
> >
> org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:179)
> > >> >         at
> > >> >
> > >>
> >
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:193)
> > >> >         at
> > >> >
> > >>
> >
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
> > >> >         at org.apache.solr.core.SolrCore.execute(SolrCore.java:1916)
> > >> >         at
> > >> >
> > >>
> >
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:780)
> > >> >         at
> > >> >
> > >>
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:427)
> > >> >         at
> > >> >
> > >>
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:217)
> > >> >         at
> > >> >
> > >>
> >
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
> > >> >         at
> > >> >
> > >>
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
> > >> >         at
> > >> >
> > >>
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
> > >> >         at
> > >> >
> > >>
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
> > >> >         at
> > >> >
> > >>
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
> > >> >         at
> > >> >
> > >>
> >
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
> > >> >         at
> > >> >
> > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
> > >> >         at
> > >> >
> > >>
> >
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
> > >> >         at
> > >> >
> > >>
> >
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
> > >> >         at
> > >> >
> > >>
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
> > >> >         at
> > >> >
> > >>
> >
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
> > >> >         at
> > >> >
> > >>
> >
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
> > >> >         at
> > >> >
> > >>
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
> > >> >         at org.eclipse.jetty.server.Server.handle(Server.java:364)
> > >> >         at
> > >> >
> > >>
> >
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
> > >> >         at
> > >> >
> > >>
> >
> org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
> > >> >         at
> > >> >
> > >>
> >
> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
> > >> >         at
> > >> >
> > >>
> >
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
> > >> >         at
> > >> org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
> > >> >         at
> > >> >
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
> > >> >         at
> > >> >
> > >>
> >
> org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
> > >> >         at
> > >> >
> > >>
> >
> org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
> > >> >         at
> > >> >
> > >>
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
> > >> >         at
> > >> >
> > >>
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
> > >> >         at java.lang.Thread.run(Thread.java:744)
> > >> > Caused by: org.apache.solr.search.SyntaxError: Cannot parse
> > >> 'city:"Stara':
> > >> > Lexical error at line 1, column 12.  Encountered: <EOF> after :
> > "\"Stara"
> > >> >         at
> > >> >
> > >>
> >
> org.apache.solr.parser.SolrQueryParserBase.parse(SolrQueryParserBase.java:159)
> > >> >         at
> > >> org.apache.solr.search.LuceneQParser.parse(LuceneQParser.java:50)
> > >> >         at org.apache.solr.search.QParser.getQuery(QParser.java:141)
> > >> >         at
> > >> >
> > >>
> >
> org.apache.solr.search.JoinQParserPlugin$1.parse(JoinQParserPlugin.java:93)
> > >> >         at org.apache.solr.search.QParser.getQuery(QParser.java:141)
> > >> >         at
> > >> >
> > >>
> >
> org.apache.solr.parser.SolrQueryParserBase.getLocalParams(SolrQueryParserBase.java:832)
> > >> >         at
> > >> org.apache.solr.parser.QueryParser.Clause(QueryParser.java:212)
> > >> >         at
> > org.apache.solr.parser.QueryParser.Query(QueryParser.java:107)
> > >> >         at
> > >> org.apache.solr.parser.QueryParser.Clause(QueryParser.java:189)
> > >> >         at
> > org.apache.solr.parser.QueryParser.Query(QueryParser.java:139)
> > >> >         at
> > >> org.apache.solr.parser.QueryParser.Clause(QueryParser.java:189)
> > >> >         at
> > org.apache.solr.parser.QueryParser.Query(QueryParser.java:107)
> > >> >         at
> > >> >
> org.apache.solr.parser.QueryParser.TopLevelQuery(QueryParser.java:96)
> > >> >         at
> > >> >
> > >>
> >
> org.apache.solr.parser.SolrQueryParserBase.parse(SolrQueryParserBase.java:152)
> > >> >        at
> > >> org.apache.solr.search.LuceneQParser.parse(LuceneQParser.java:50)
> > >> >         at org.apache.solr.search.QParser.getQuery(QParser.java:141)
> > >> >         at
> > >> >
> > >>
> >
> org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:168)
> > >> >         ... 31 more
> > >> > Caused by: org.apache.solr.parser.TokenMgrError: Lexical error at
> > line 1,
> > >> > column 12.  Encountered: <EOF> after : "\"Stara"
> > >> >         at
> > >> >
> > >>
> >
> org.apache.solr.parser.QueryParserTokenManager.getNextToken(QueryParserTokenManager.java:1197)
> > >> >         at
> > >> org.apache.solr.parser.QueryParser.jj_ntk(QueryParser.java:579)
> > >> >         at
> > >> org.apache.solr.parser.QueryParser.Clause(QueryParser.java:174)
> > >> >         at
> > org.apache.solr.parser.QueryParser.Query(QueryParser.java:107)
> > >> >         at
> > >> >
> org.apache.solr.parser.QueryParser.TopLevelQuery(QueryParser.java:96)
> > >> >         at
> > >> >
> > >>
> >
> org.apache.solr.parser.SolrQueryParserBase.parse(SolrQueryParserBase.java:152)
> > >> >         ... 47 more
> > >> >
> > >> > But the below query works fine:
> > >> > <str name="q">*:*</str>
> > >> > <arr name="fq">
> > >> > <str>
> > >> > {!join from=inner_id to=outer_id fromIndex=othercore}city:"Stara
> > Zagora"
> > >> > </str>
> > >> > <str>prod:214</str>
> > >> > </arr>
> > >> >
> > >> > What is wrong ? Is it AND operator ?
> > >> > The only workaround I found is to skip double quotes and use
> question
> > >> mark
> > >> > instead of space:
> > >> > <str name="q">*:*</str>
> > >> > <str name="fq">
> > >> > (({!join from=inner_id to=outer_id
> > >> fromIndex=othercore}city:Stara?Zagora))
> > >> > AND (prod:214)
> > >> > </str>
> > >> >
> > >> > Then it works, but it's not the best solution. Any other ideas ?
> > >> > I kindly appreciate your help. Thanks.
> > >> >
> > >> > Regards.
> > >>
> >
>

Reply via email to