lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eshwaramoorthy Babu" <>
Subject Multiple character wildcard search
Date Mon, 04 Dec 2006 08:45:17 GMT

Can anyone please tell me how to specify multiple character wildcard
searches in "Term"

Below is my requirement

1) I want search all names that starts with Z (Z*)

2) My programme will receive list of names in JAVA collection (Vector or
ArrayList or Hashtable), I want to search for all the names which are not
there in the collection

I have tried the below code to implement the 1st problem but the search
returns 0 result

Analyzer analyzer = new WhitespaceAnalyzer();

boolean createFlag = true;




IndexSearcher searcher = new IndexSearcher(indexDir1);

Query query = new TermQuery(new Term("name", "Z*"));

When I execute teh above code the search is returning 0 Hits.

If I give the full name "Zane" the search returns 1 Hits.

Thanks in advance,


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message