Package org.eurekastreams.commons.search.analysis

Examples of org.eurekastreams.commons.search.analysis.TextStemmerAnalyzer


        List<String> fieldsToAnalyze = new ArrayList<String>();
        fieldsToAnalyze.add("typeOfAuto");
        fieldsToAnalyze.add("name");

        sut.setFieldsToAnalyze(fieldsToAnalyze);
        sut.setSearchAnalyzer(new TextStemmerAnalyzer());
        FieldMatch matches = sut.determineFieldMatches(getExplanation(), "ford cars");

        assertTrue(matches.isMatch("typeOfAuto"));
        assertTrue(matches.isMatch("name"));
        assertFalse(matches.isMatch("foobar"));
View Full Code Here


    @Test
    public void testDetermineFieldMatchesWithNoFields()
    {
        FieldMatchDeterminer sut = new FieldMatchDeterminer();
        sut.setFieldsToAnalyze(new ArrayList<String>());
        sut.setSearchAnalyzer(new TextStemmerAnalyzer());

        FieldMatch matches = sut.determineFieldMatches(getExplanation(), "ford cars");

        assertFalse(matches.isMatch("typeOfAuto"));
        Object[] matchedKeywords = matches.getMatchingKeywords("typeOfAuto").toArray();
View Full Code Here

        FieldMatchDeterminer sut = new FieldMatchDeterminer();
        List<String> fieldsToAnalyze = new ArrayList<String>();
        fieldsToAnalyze.add("typeOfAuto");

        sut.setFieldsToAnalyze(fieldsToAnalyze);
        sut.setSearchAnalyzer(new TextStemmerAnalyzer());
        FieldMatch matches = sut.determineFieldMatches(getExplanation(), "ford cars");

        assertTrue(matches.isMatch("typeOfAuto"));
        assertFalse(matches.isMatch("name"));
        assertFalse(matches.isMatch("foobar"));
View Full Code Here

TOP

Related Classes of org.eurekastreams.commons.search.analysis.TextStemmerAnalyzer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.