lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luke Shannon" <lshan...@futurebrand.com>
Subject Starts With x and Ends With x Queries
Date Sat, 05 Feb 2005 00:50:26 GMT
Hello;

I have these two documents:

Text<sort:9>
Keyword<modified:0e1as4og8>
Text<progress_ref:1099927045180>
Text<name:FutureBrand Testing>
Text<desc:Demo>
Text<anouncement:We are testing our project>
Text<category:Category 1>
Text<olfaithfull:stillhere>
Text<poster:hello>
Text<urgent:yes>
Text<provider:Mo>


Text<sort:1>
Text<Author:cbalom>
Text<Creator:PScript5.dll Version 5.2.2>
Keyword<modified:0e1bgsfk0>
Keyword<modified:0e1bgsfk0>
Text<Producer:Acrobat Distiller 5.0.5 (Windows)>
Text<progress_ref:1099957931806>
Text<name:testing stuff>
Text<desc:testing>
Text<category:Category 1>
Text<olfaithfull:stillhere>
Text<poster:hello>
Text<Title:Microsoft Word - FINAL-FutureBrand Creates, Launches 'Air Canada'
Brand Ide.>
Text<provider:Ray>
Text<kcfileupload:aircanada3.pdf>

I would like to be able to match a name fields that starts with testing
(specifically) and those that end with it.

I thought the below code would parse to a Prefix Query that would satisfy my
starting requirment (maybe I don't understand what this query is for). But
this matches both.

Query query = QueryParser.parse("testing*", "name", new StandardAnalyzer());

Has anyone done this before? Any tips?

Thanks,

Luke



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


Mime
View raw message