What is "term" in the "defType=term", do you mean the raw word "term" or
something else?  Because I tried that too in two different ways:

Using correct Solr syntax:


http://localhost:8983/solr/db/select?q={!q.op=AND%20df=text}%20solr%20sys&fl=id%2Cscore%2Ctitle&wt=xml&indent=true&defType=term

This throws a NPE exception:

    java.lang.NullPointerException at

org.apache.solr.schema.IndexSchema$DynamicReplacement$DynamicPattern$NameEndsWith.matches(IndexSchema.java:1033)
at

org.apache.solr.schema.IndexSchema$DynamicReplacement.matches(IndexSchema.java:1047)
at
    org.apache.solr.schema.IndexSchema.dynFieldType(IndexSchema.java:1303)
at

org.apache.solr.schema.IndexSchema.getFieldTypeNoEx(IndexSchema.java:1280)
at

org.apache.solr.search.TermQParserPlugin$1.parse(TermQParserPlugin.java:56)
at

And when I try it with invalid Solr search syntax:


http://localhost:8983/solr/db/select?q={!q.op=AND%20df=text%20solr%20sys&fl=id%2Cscore%2Ctitle&wt=xml&indent=true&defType=term


This gives me the SyntaxError:

    org.apache.solr.search.SyntaxError: Expected identifier at pos 27
str='{!q.op=AND df=text solr sys'

What am I missing?

Steve

On Thu, Apr 16, 2015 at 10:43 AM, Shawn Heisey <apa...@elyograg.org> wrote:

> On 4/16/2015 7:49 AM, Steven White wrote:
> > defType didn't work:
> >
> >
> >
> http://localhost:8983/solr/db/select?q={!q.op=AND%20df=text%20solr%20sys&fl=id%2Cscore%2Ctitle&wt=xml&indent=true&defType=lucene
> >
> > Gave me error:
> >
> >     org.apache.solr.search.SyntaxError: Expected identifier at pos 27
> > str='{!q.op=AND df=text solr sys'
> >
> > Is my use of defType correct?
>
> If everything is at defaults and you don't have defType in the handler
> definition, then defType=lucene doesn't do anything - it specifically
> says "use the lucene parser" which is the default.  You want
> defType=term instead.
>
> Thanks,
> Shawn
>
>

Reply via email to