lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Terence Lai <>
Subject Building query to match a sub-string of a field
Date Tue, 29 Jun 2004 21:28:31 GMT
Hi Everyone,

I am trying to construct a query which matches a sub-string of a field. As an illustration,
I would like to search the following words by using the sub-string "test":

- test
- testing
- contest
- contestable

I realize that Lucene does support wildcard searches using "*" and "?" in the custom query.
Therefore, the query string "*test*" should give me the right result. However, the Lucene
query syntax ( does not allow
the wildcard "*" as the first character of the search. Therefore, the query "*test*" is invalid.
Does anyone have a solution to build the query to achieve the same result?


Get your free email account from
          Your Internet Virtual Desktop!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message