Hi,
  yes I've got the stack trace giving me the beginning of an explanation.

  One of the QueryParsers  I use in my Query parser plugin is a
multifiedQueryParser and it needs a fields aware Analyzer, which I get
from the schema like this:

req.getSchema().getQueryAnalyzer();

I think it's in this analyzer that the undefined field error happens
(because for instance the field 'foo' doesn't exists in the schema,
and so it's impossible to find a specific analyzer to this field in
the schema).

The strange thing is that any QueryParser (Lucene API) is supposed to
raise a ParseException if anything wrong happens with the parsing with
the parse(String) method.

But here, it seems that the Analyzer from the schema (the one we get
from getQueryAnalyzer()) is creating it's own error ( the undefined
field one, instance of SolrException) and instead of propagating it to
the QueryParser which could have a chance to propagate it as a
standard ParseException, it seems it stops solr processing the query
directly.


Here's the full stack (with the undefined field being 'hwss' )

   org.apache.solr.common.SolrException: undefined field hwss
        at 
org.apache.solr.schema.IndexSchema.getDynamicFieldType(IndexSchema.java:1053)
        at 
org.apache.solr.schema.IndexSchema$SolrQueryAnalyzer.getAnalyzer(IndexSchema.java:373)
        at 
org.apache.solr.schema.IndexSchema$SolrIndexAnalyzer.tokenStream(IndexSchema.java:348)
        at 
org.apache.lucene.queryParser.QueryParser.getFieldQuery(QueryParser.java:473)
        at 
org.apache.lucene.queryParser.MultiFieldQueryParser.getFieldQuery(MultiFieldQueryParser.java:120)
        at 
org.apache.lucene.queryParser.MultiFieldQueryParser.getFieldQuery(MultiFieldQueryParser.java:135)
        at org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1248)
        at 
org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1135)
        at 
org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1092)
        at 
org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1052)
        at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:168)
        at my.organisation.lucene.queryParser.MyLuceneQueryParser.parse(Unknown
Source)
        at my.organisation.solr.search.MyQParser.parse(Unknown Source)
        at org.apache.solr.search.QParser.getQuery(QParser.java:88)
        at 
org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:82)
        at 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:155)
        at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1204)
        at 
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:303)
        at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:232)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)

Cheers !

Jerome.

On Tue, Sep 30, 2008 at 10:34 PM, Yonik Seeley <[EMAIL PROTECTED]> wrote:
> On Tue, Sep 30, 2008 at 2:42 PM, Jérôme Etévé <[EMAIL PROTECTED]> wrote:
>> But still I have an error from the webapp when I try to query my
>> schema with non existing fields in my query ( like foo:bar ).
>>
>> I'm wondering if the query q is parsed in a very simple way somewhere
>> else (and independently from any customized QParserPlugin) and checked
>> against the schema.
>
> It should not be.  Are you sure your QParser is being used?
> Does the error contain a stack trace that can pinpoint where it's coming from?
>
> -Yonik
>



-- 
Jerome Eteve.

Chat with me live at http://www.eteve.net

[EMAIL PROTECTED]

Reply via email to