Wildcard Search over multiple fields

2008-05-07 Thread jm85

Hello,

What is the best method of performing a leading and trailing wildcard search
over multiple fields? Currently I performing a wildcard search on one field
at the time, but this potentially inefficient:

WildcardQuery wildCardQuery = new WildcardQuery(new Term(searchField, * +
searchText + *));

Thanks for your help,

James Murphy
-- 
View this message in context: 
http://www.nabble.com/Wildcard-Search-over-multiple-fields-tp17101839p17101839.html
Sent from the Lucene - General mailing list archive at Nabble.com.



Re: Wildcard Search over multiple fields

2008-05-07 Thread Otis Gospodnetic
Hello,

Wildard queries are inefficient in general.  But it sounds like you simply want 
to combine them into a BooleanQuery where each clause is a SHOULD clause.

A better place to ask is java-user list.

Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch


- Original Message 
 From: jm85 [EMAIL PROTECTED]
 To: general@lucene.apache.org
 Sent: Wednesday, May 7, 2008 7:14:03 AM
 Subject: Wildcard Search over multiple fields
 
 
 Hello,
 
 What is the best method of performing a leading and trailing wildcard search
 over multiple fields? Currently I performing a wildcard search on one field
 at the time, but this potentially inefficient:
 
 WildcardQuery wildCardQuery = new WildcardQuery(new Term(searchField, * +
 searchText + *));
 
 Thanks for your help,
 
 James Murphy
 -- 
 View this message in context: 
 http://www.nabble.com/Wildcard-Search-over-multiple-fields-tp17101839p17101839.html
 Sent from the Lucene - General mailing list archive at Nabble.com.