Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@apache.org Received: (qmail 89851 invoked from network); 30 May 2003 00:51:07 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 30 May 2003 00:51:07 -0000 Received: (qmail 1281 invoked by uid 97); 30 May 2003 00:53:26 -0000 Delivered-To: qmlist-jakarta-archive-lucene-user@nagoya.betaversion.org Received: (qmail 1274 invoked from network); 30 May 2003 00:53:26 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 30 May 2003 00:53:26 -0000 Received: (qmail 89562 invoked by uid 500); 30 May 2003 00:51:04 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 89551 invoked from network); 30 May 2003 00:51:04 -0000 Received: from mzpi3.forethought.net (HELO mz1.forethought.net) (216.241.36.12) by daedalus.apache.org with SMTP; 30 May 2003 00:51:04 -0000 Received: from j72.denver.dsl.forethought.net ([216.241.38.72] helo=www.doomdark.org) by mz1.forethought.net with esmtp (Exim 4.14) id 19LY6y-0004pd-Ll for lucene-user@jakarta.apache.org; Thu, 29 May 2003 18:51:12 -0600 Content-Type: text/plain; charset="iso-8859-1" From: Tatu Saloranta Reply-To: tatu@hypermall.net Organization: Linux-users missalie To: "Lucene Users List" Subject: Re: Wildcard workaround Date: Thu, 29 May 2003 18:57:57 -0600 User-Agent: KMail/1.4.3 References: <336674949053D511BF4D00A0C9B3D3649EAF0D@SONIA> <01e101c3250e$5ece8af0$6822a8c0@medined01> In-Reply-To: <01e101c3250e$5ece8af0$6822a8c0@medined01> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200305291857.57430.tatu@hypermall.net> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Wednesday 28 May 2003 05:43, David Medinets wrote: > ----- Original Message ----- > From: "Andrei Melis" > > > As far as I have understood, lucene does not allow search queries > > starting with wildcards. I have a file database indexed by content > > and also by filename. It would be nice if the user could perform a > > usual search like "*.ext". > > Does anyone know if Oracle patented the technique that they use for *ext > searching in the Oracle Text product. If not, I'm sure the technique can be > borrowed. > > On the other hand, the slow technique of comparing each term to *.ext can > certainly be implemented with a minimum of effort, I think. [apologies if somebody else already pointed this out... I missed some mails to the list from yesterday] One of the most interesting solutions somebody posted earlier, was to use 2 indexes; one for 'normal' searches, with normal analyzer etc, and second one that uses reversed words; ie. analyzer reverses words tokenized by standard analyzer. This second index would then allow for searches to do prefix match, in this case query would be something like reverse_field:txe.* This would work efficiently, although pretty much double the size of index for content that has to be prefix-searchable. Still, this solution somehow appeals to my hacker side. :-) In this specific case, though, what others have suggested (add file prefix as separate field to search on), is probably more practical. -+ Tatu +- --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org