lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wen Gao <>
Subject [Lucene.Net] Phrase search with Wildcard query
Date Wed, 23 Feb 2011 15:51:25 GMT
I'm using Wildcard query to search phrases, but failed to get results. E.g.
I search for "*data man*",however, no result returned although there is a
record of "*data manage*" in my index. I change the "data man" as
"*data*man*" using following code:

String s = "*" + s.Replace(" ", "*") + "*";
 WildcardQuery wildquery = new Lucene.Net.Search.WildcardQuery(new
Lucene.Net.Index.Term("name", keyword));

It works if I only search part of phrase without 'space', e.g.  the record
returns when i type "*data*".

Any ideas?


Wen Gao

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