lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (Updated) (JIRA)" <>
Subject [jira] [Updated] (SOLR-2824) Cross-Core Join doesn't parse fields against joining schema
Date Wed, 30 Nov 2011 01:27:41 GMT


Hoss Man updated SOLR-2824:

    Attachment: SOLR-2824.patch

I hacked up a test case demonstrating the problem, but ran out of time before i could try
fixing it.  (At the moment the test just demonstrates the problem of *parsing* a cross index
join, it doesn't actually try to utilize it - our Test framework does't make it easy to index/query
multiple cores in a single test)

At first glance, it seems fairly straight forward to fix the JoinQParser to get the "fromIndex"
SolrCore via the CoreContainer and then ask it for a parser to parse the nested query, but
a few things concern me:

1) should local params from the '{!join...}' expression (besides from,to, and fromIndex) be
passed to the QParser fetched from the fromIndex ?

2) Are there other bugs lurking in JoinQuery itself that need better cross-index testing?
 In particular the JoinQuery.rewrite method smells fishy.
> Cross-Core Join doesn't parse fields against joining schema
> -----------------------------------------------------------
>                 Key: SOLR-2824
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: multicore, search
>    Affects Versions: 4.0
>            Reporter: Thijs Vonk
>         Attachments: SOLR-2824.patch
> I have two cores with 2 different schema's
> now I want to join between the 2 cores. where I filter on a field from one core that
doesn't exist in the other core.
> core1: {childIds, name, id}, core2:{id, type, specials}
> I have the following query
> /core1/select?q=*:*&fq={!join from=id to=childIds fromIndex=core2}specials:1&fl=id,name
> I get this exception [1]
> Looking at the debugger I see that
>     at$1.parse(
> the parse is called  for the filterquery on the main core (core1). Not the core of the
'fromIndex' (core2) 
> [1]
> SEVERE: org.apache.solr.common.SolrException: undefined field specials
>         at org.apache.solr.schema.IndexSchema.getDynamicFieldType(
>         at org.apache.solr.schema.IndexSchema$SolrQueryAnalyzer.getWrappedAnalyzer(
>         at org.apache.lucene.analysis.AnalyzerWrapper.createComponents(
>         at org.apache.lucene.analysis.Analyzer.tokenStream(
>         at org.apache.lucene.queryparser.classic.QueryParserBase.newFieldQuery(
>         at org.apache.lucene.queryparser.classic.QueryParserBase.getFieldQuery(
>         at
>         at org.apache.lucene.queryparser.classic.QueryParserBase.handleBareTokenQuery(
>         at org.apache.lucene.queryparser.classic.QueryParser.Term(
>         at org.apache.lucene.queryparser.classic.QueryParser.Clause(
>         at org.apache.lucene.queryparser.classic.QueryParser.Query(
>         at org.apache.lucene.queryparser.classic.QueryParser.TopLevelQuery(
>         at org.apache.lucene.queryparser.classic.QueryParserBase.parse(
>         at
>         at
>         at$1.parse(
>         at
>         at org.apache.solr.handler.component.QueryComponent.prepare(
>         at org.apache.solr.handler.component.SearchHandler.handleRequestBody(
>         at org.apache.solr.handler.RequestHandlerBase.handleRequest(
>         at org.apache.solr.core.SolrCore.execute(
>         at org.apache.solr.servlet.SolrDispatchFilter.execute(
>         at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(
>         at org.apache.catalina.core.StandardWrapperValve.invoke(
>         at org.apache.catalina.core.StandardContextValve.invoke(
>         at org.apache.catalina.core.StandardHostValve.invoke(
>         at org.apache.catalina.valves.ErrorReportValve.invoke(
>         at org.apache.catalina.core.StandardEngineValve.invoke(
>         at org.apache.catalina.connector.CoyoteAdapter.service(
>         at org.apache.coyote.http11.Http11Processor.process(
>         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
>         at$
>         at

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message