Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 37009 invoked from network); 21 Mar 2007 08:21:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Mar 2007 08:21:56 -0000 Received: (qmail 13343 invoked by uid 500); 21 Mar 2007 08:22:01 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 13308 invoked by uid 500); 21 Mar 2007 08:22:01 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 13281 invoked by uid 99); 21 Mar 2007 08:22:00 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Mar 2007 01:22:00 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Mar 2007 01:21:52 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2ABD9714041 for ; Wed, 21 Mar 2007 01:21:32 -0700 (PDT) Message-ID: <27082354.1174465292170.JavaMail.jira@brutus> Date: Wed, 21 Mar 2007 01:21:32 -0700 (PDT) From: "Michael Schlegel (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-838) WildcardQuery do not find documents In-Reply-To: <19150828.1174411472535.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-838?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel#action_12482670 ]=20 Michael Schlegel commented on LUCENE-838: ----------------------------------------- Hi ! Sorry, but it was my first bug request. You resolved the bug because you can not reproduce. Here is the a simple example code, which demonstrate the problem: public class WildcardTest { =20 public static void main(String[] args) throws Exception { Analyzer analyzer =3D new GermanAnalyzer(); =20 RAMDirectory indexStore =3D getIndexStore("fulltext", new String[]{= "Forschungsgebiet", "business"}, analyzer); =20 IndexSearcher searcher =3D new IndexSearcher(indexStore); =20 QueryParser parser =3D new QueryParser( "fulltext", analyzer ); Query query1 =3D parser.parse("fulltext:Forschungsgebie*"); Query query2 =3D parser.parse("fulltext:Forschungsgebiet*"); =20 =20 Hits result =3D searcher.search(query1); System.out.println( query1.toString() ); System.out.println( "Query '" + query1.toString() + "' found: " + r= esult.length() + " documents !"); result =3D searcher.search(query2); System.out.println( query2.toString() ); System.out.println( "Query '" + query2.toString() + "' found: " + r= esult.length() + " documents !"); =20 searcher.close(); indexStore.close(); } =20 private static RAMDirectory getIndexStore(String field, String[] conten= ts, Analyzer p_Analyzer) throws IOException { RAMDirectory indexStore =3D new RAMDirectory(); IndexWriter writer =3D new IndexWriter(indexStore, p_Analyzer, true= ); for (int i =3D 0; i < contents.length; ++i) { Document doc =3D new Document(); doc.add(new Field(field, contents[i], Field.Store.YES, Field.In= dex.TOKENIZED)); writer.addDocument(doc); } writer.optimize(); writer.close(); =20 return indexStore; } } Output: Query 'fulltext:forschungsgebie*' found: 1 documents ! Query 'fulltext:forschungsgebiet*' found: 0 documents ! ----- Urspr=C3=BCngliche Mail ---- Von: Hoss Man (JIRA) An: lulog1@yahoo.de Gesendet: Dienstag, den 20. M=C3=A4rz 2007, 19:07:32 Uhr Betreff: [jira] Resolved: (LUCENE-838) WildcardQuery do not find documents [ https://issues.apache.org/jira/browse/LUCENE-838?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Hoss Man resolved LUCENE-838. ----------------------------- Resolution: Cannot Reproduce --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. =09=09 ___________________________________________________________=20 Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de > WildcardQuery do not find documents > ----------------------------------- > > Key: LUCENE-838 > URL: https://issues.apache.org/jira/browse/LUCENE-838 > Project: Lucene - Java > Issue Type: Bug > Components: Search > Affects Versions: 1.9, 2.0.0, 2.1 > Environment: Windows XP; JDK 1.5 > Reporter: Michael Schlegel > > Example: > I index a document by using GermanAnalyzer. > This document contains following word "Forschungsgebiet". > This word will be analyzed and transformed to "Forschungsgebie". > If i use query "Forschungsgebiet" to search the document, i will find the= document. > If i use query "Forschungsgebie*" or "Forschung*" i will find the documen= t too. > But if i use query "Forschungsgebiet*" or "?orschungsgebiet" i never will= find this document. > It looks so that the query will not be analyzed by the given Analyzer and= thatswhy i will not find the document (Forschungsgebiet !=3D Forschungs= gebie). > The same can happen if a other analyzer is used. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org