You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by "Biswas, Goutam_Kumar" <Go...@deshaw.com> on 2003/04/27 09:02:14 UTC

prefixquery not working on migrating to Lucene 1.3

Hi,

I have been using queries like: filename:(txt) AND
path:(/u/biswasg/Install*) with Lucene 1.2 which gave me correct results. I
moved to Lucene 1.3 a while ago and find that these queries no longer work.
The Lucene Query is: +txt +path:/u/biswasg/install*. I observe that the path
has been lowercased (which did not happen when I was using 1.2).

I made the following changes in my code when I moved over to 1.3.
	
        QueryParser qp = new QueryParser(defaultSearchField, new
MyAnalyzer());
        qp.setOperator(QueryParser.DEFAULT_OPERATOR_AND);

How can I prevent Lucene from lower casing query terms that ends with a *. I
must mention that my objective here is to restrict my search results to
those files that begin with a spceified prefix.

Any help on this is appreciated.

Thanks,
-Goutam


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


Re: prefixquery not working on migrating to Lucene 1.3

Posted by Otis Gospodnetic <ot...@yahoo.com>.
I think that may be due to one of the new QueryParser methods.
setWildcardLowercase(boolean), I think.  Check the source for the exact
method name.

Otis


--- "Biswas, Goutam_Kumar" <Go...@deshaw.com> wrote:
> Hi,
> 
> I have been using queries like: filename:(txt) AND
> path:(/u/biswasg/Install*) with Lucene 1.2 which gave me correct
> results. I
> moved to Lucene 1.3 a while ago and find that these queries no longer
> work.
> The Lucene Query is: +txt +path:/u/biswasg/install*. I observe that
> the path
> has been lowercased (which did not happen when I was using 1.2).
> 
> I made the following changes in my code when I moved over to 1.3.
> 	
>         QueryParser qp = new QueryParser(defaultSearchField, new
> MyAnalyzer());
>         qp.setOperator(QueryParser.DEFAULT_OPERATOR_AND);
> 
> How can I prevent Lucene from lower casing query terms that ends with
> a *. I
> must mention that my objective here is to restrict my search results
> to
> those files that begin with a spceified prefix.
> 
> Any help on this is appreciated.
> 
> Thanks,
> -Goutam
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

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