FileDocCategorySizeDatePackage
TestAnalyzingQueryParser.javaAPI DocApache Lucene 2.1.04612Wed Feb 14 10:46:22 GMT 2007org.apache.lucene.queryParser.analyzing

TestAnalyzingQueryParser

public class TestAnalyzingQueryParser extends TestCase
author
Ronnie Kolehmainen (ronnie.kolehmainen at ub.uu.se)
version
$Revision$, $Date$

Fields Summary
private Analyzer
a
private String[]
wildcardInput
private String[]
wildcardExpected
private String[]
prefixInput
private String[]
prefixExpected
private String[]
rangeInput
private String[]
rangeExpected
private String[]
fuzzyInput
private String[]
fuzzyExpected
Constructors Summary
Methods Summary
private java.lang.StringparseWithAnalyzingQueryParser(java.lang.String s, org.apache.lucene.analysis.Analyzer a)

    AnalyzingQueryParser qp = new AnalyzingQueryParser("field", a);
    org.apache.lucene.search.Query q = qp.parse(s);
    return q.toString("field");
  
public voidsetUp()

    wildcardInput = new String[] { "übersetzung über*ung",
        "Mötley Cr\u00fce Mötl?* Crü?", "Renée Zellweger Ren?? Zellw?ger" };
    wildcardExpected = new String[] { "ubersetzung uber*ung", "motley crue motl?* cru?",
        "renee zellweger ren?? zellw?ger" };

    prefixInput = new String[] { "übersetzung übersetz*",
        "Mötley Crüe Mötl* crü*", "René? Zellw*" };
    prefixExpected = new String[] { "ubersetzung ubersetz*", "motley crue motl* cru*",
        "rene? zellw*" };

    rangeInput = new String[] { "[aa TO bb]", "{Anaïs TO Zoé}" };
    rangeExpected = new String[] { "[aa TO bb]", "{anais TO zoe}" };

    fuzzyInput = new String[] { "Ã