: have solved it in their client.  I can't modify Solr / Lucene code and I'm
: using Solr 1.2.
: 
: What I have done is simple.  Given a user input, I break it into words and
: then analyze each word.  Any word contains wildcards (* Or ?) I lowercase
: it.
: 
: While the logic is simple, I'm not comfortable with it because the
: word-breaker isn't based on the analyzer in use by Lucene.  In my case, I
: can't tell which analyzer is used.

i wouldn't relaly owrry baout that -- the QueryParser doesn't know which 
Analyzer to use until it's done a first pass over the input and split it 
up into QueryParser.Tokens (not to be confused with o.a.l.analysis.Tokens) 
as well.

Depending on how worried you are about things like quote characters 
appearing in your user input, splitting on whitespace is essentially what 
the Lucene QueryParser does as well .. if you really want to be carefull 
about things, you can use a custom subclass of the QueryParser on your 
client side, and let the query parser grammer split the input up for you.  
(disclaimer: i've never tried doing anything remotely like this)


-Hoss

Reply via email to