You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael Schlegel (JIRA)" <ji...@apache.org> on 2007/03/20 18:24:32 UTC
[jira] Created: (LUCENE-838) WildcardQuery do not find documents
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: 2.1, 2.0.0, 1.9
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 document 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 != Forschungsgebie).
The same can happen if a other analyzer is used.
--
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
[jira] Reopened: (LUCENE-838) WildcardQuery do not find documents
Posted by "Michael Schlegel (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Schlegel reopened LUCENE-838:
-------------------------------------
> 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 document 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 != Forschungsgebie).
> The same can happen if a other analyzer is used.
--
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
[jira] Commented: (LUCENE-838) WildcardQuery do not find documents
Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12482461 ]
Hoss Man commented on LUCENE-838:
---------------------------------
please do not open Jira bugs without first consulting the java-user list to ensure that there is in fact something wrong in Lucene (and not that the problem is a misunderstanding you have about the documentation)
Bug reports without code demonstrating the problem (preferably in the form of a Unit test) are also not very useful in general.
> 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 document 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 != Forschungsgebie).
> The same can happen if a other analyzer is used.
--
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
[jira] Commented: (LUCENE-838) WildcardQuery do not find documents
Posted by "Michael Schlegel (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12482670 ]
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
{
public static void main(String[] args) throws Exception
{
Analyzer analyzer = new GermanAnalyzer();
RAMDirectory indexStore = getIndexStore("fulltext", new String[]{"Forschungsgebiet", "business"}, analyzer);
IndexSearcher searcher = new IndexSearcher(indexStore);
QueryParser parser = new QueryParser( "fulltext", analyzer );
Query query1 = parser.parse("fulltext:Forschungsgebie*");
Query query2 = parser.parse("fulltext:Forschungsgebiet*");
Hits result = searcher.search(query1);
System.out.println( query1.toString() );
System.out.println( "Query '" + query1.toString() + "' found: " + result.length() + " documents !");
result = searcher.search(query2);
System.out.println( query2.toString() );
System.out.println( "Query '" + query2.toString() + "' found: " + result.length() + " documents !");
searcher.close();
indexStore.close();
}
private static RAMDirectory getIndexStore(String field, String[] contents, Analyzer p_Analyzer)
throws IOException
{
RAMDirectory indexStore = new RAMDirectory();
IndexWriter writer = new IndexWriter(indexStore, p_Analyzer, true);
for (int i = 0; i < contents.length; ++i)
{
Document doc = new Document();
doc.add(new Field(field, contents[i], Field.Store.YES, Field.Index.TOKENIZED));
writer.addDocument(doc);
}
writer.optimize();
writer.close();
return indexStore;
}
}
Output:
Query 'fulltext:forschungsgebie*' found: 1 documents !
Query 'fulltext:forschungsgebiet*' found: 0 documents !
----- Ursprüngliche Mail ----
Von: Hoss Man (JIRA) <ji...@apache.org>
An: lulog1@yahoo.de
Gesendet: Dienstag, den 20. März 2007, 19:07:32 Uhr
Betreff: [jira] Resolved: (LUCENE-838) WildcardQuery do not find documents
[ https://issues.apache.org/jira/browse/LUCENE-838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hoss Man resolved LUCENE-838.
-----------------------------
Resolution: Cannot Reproduce
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
___________________________________________________________
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 document 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 != Forschungsgebie).
> The same can happen if a other analyzer is used.
--
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
[jira] Resolved: (LUCENE-838) WildcardQuery do not find documents
Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hoss Man resolved LUCENE-838.
-----------------------------
Resolution: Cannot Reproduce
> 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 document 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 != Forschungsgebie).
> The same can happen if a other analyzer is used.
--
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
[jira] Updated: (LUCENE-838) WildcardQuery do not find documents
Posted by "Michael Schlegel (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Schlegel updated LUCENE-838:
------------------------------------
Summary: WildcardQuery do not find documents (was: WildcardQuery do not find documents if different analyzer will be used.)
> 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 document 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 != Forschungsgebie).
> The same can happen if a other analyzer is used.
--
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
[jira] Resolved: (LUCENE-838) WildcardQuery do not find documents
Posted by "Doron Cohen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doron Cohen resolved LUCENE-838.
--------------------------------
Resolution: Invalid
This is a known behavior - wild card queries are not analyzed.
In Lucene FAQ: "Are Wildcard, Prefix, and Fuzzy queries case sensitive?".
In the user list http://www.mail-archive.com/search?l=java-user@lucene.apache.org&q=wildcard+german
> 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 document 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 != Forschungsgebie).
> The same can happen if a other analyzer is used.
--
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
[jira] Updated: (LUCENE-838) WildcardQuery do not find documents if
different analyzer will be used.
Posted by "Michael Schlegel (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Schlegel updated LUCENE-838:
------------------------------------
Summary: WildcardQuery do not find documents if different analyzer will be used. (was: WildcardQuery do not find documents)
> WildcardQuery do not find documents if different analyzer will be used.
> -----------------------------------------------------------------------
>
> 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 document 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 != Forschungsgebie).
> The same can happen if a other analyzer is used.
--
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