lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djd0383 <ddigm...@formos.com>
Subject Re: Searching with "1"
Date Mon, 25 Sep 2006 17:36:03 GMT

My QueryParser looks like this:

query = QueryParser.parse("1*","allText",analyzer);

analyzer is predetermited for this class.  Is there something special I
should be setting in this to allow for this search string?

Thanks again!



Doron Cohen wrote:
> 
> djd0383 <ddigmann@formos.com> wrote on 22/09/2006 17:01:47:
>>
>> And why would Lucene be doing that now?  That just doesn't seem to be the
>> right thing to do.
>>
> 
> This would depend on the analyzer being used.
> It puzzles me that you say the user query is "1" but the query that throws
> the exception is PrefixQuery.
> Do you create the Prefix query programmatically, or do you use
> QueryParser?
> QueryParser would create a prefix query for "1*" but not for "1".
> If you list a short snippet of code that you use for the search this would
> help, e.g. something like:
>     ...
>     String qtxt = "1";
>     QueryParser qp = new QueryParser("fieldName", new StandardAnalyzer());
>     Query q = qp.parse(qtxt);
>     ...
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Searching-with-%221%22-tf2320552.html#a6491379
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message