FileDocCategorySizeDatePackage
TestAnalyzingQueryParser.javaAPI DocApache Lucene 1.94424Mon Feb 20 09:18:22 GMT 2006org.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[] { "Ã