We've got an app in production that executes leading wildcard queries just
fine.

<lst name="responseHeader">
  <int name="status">0</int>
  <int name="QTime">1298</int>
  <lst name="params">
    <str name="q">title:*news</str>
  </lst>
</lst>
<result name="response" numFound="5514" start="0">

The same app in dev/qa has undergone a major schema/solrconfig overhaul,
including introducing multiple cores, and leading wildcard queries no longer
work...

org.apache.lucene.queryParser.ParseException: Cannot parse 'title:*news':
'*' or '?' not allowed as first character in WildcardQuery

All fields are exhibiting this behavior, whether their fieldType changed or
not.  In the case of title, it did not change.

I intend to pour over the changes to see what might have screwed things up,
but is there some simple setting somewhere that turns this on and off?  I
know https://issues.apache.org/jira/browse/SOLR-218 deals with this, but I
have to think there's some other way to do it or else our prod app wouldn't
be successfully executing Wildcard queries.  Is there another way without
QueryParser.setAllowLeadingWildcard(true)?

(Running 1.4 in all environments, although "newer" versions of 1.4
(downloaded more recently) in dev and qa.)

Thoughts?


-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Leading-Wildcard-query-strangeness-tp931809p931809.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to