Package com.flaptor.hounder.searcher.query

Examples of com.flaptor.hounder.searcher.query.WordQuerySuggestor.suggest()


        FSDirectory origDir = FSDirectory.getDirectory(tmpDir + File.separator + "indexer" + File.separator + "indexes" + File.separator + "index");
        FSDirectory spellDir = FSDirectory.getDirectory(tmpDir + File.separator + "spell");
        new DidYouMeanIndexer().createSpellIndex("content".intern(), origDir, spellDir);
        WordQuerySuggestor suggestor = new WordQuerySuggestor(spellDir.getFile());

        assertNotNull(suggestor.suggest(new LazyParsedQuery("content")));
        assertNotNull(suggestor.suggest(new LazyParsedQuery("contenta")));
        assertNotNull(suggestor.suggest(new LazyParsedQuery("contetb")));

        Config searcherConfig = Config.getConfig("searcher.properties");
        searcherConfig.set("compositeSearcher.useSpellCheckSuggestQuery", "true");
View Full Code Here


        FSDirectory spellDir = FSDirectory.getDirectory(tmpDir + File.separator + "spell");
        new DidYouMeanIndexer().createSpellIndex("content".intern(), origDir, spellDir);
        WordQuerySuggestor suggestor = new WordQuerySuggestor(spellDir.getFile());

        assertNotNull(suggestor.suggest(new LazyParsedQuery("content")));
        assertNotNull(suggestor.suggest(new LazyParsedQuery("contenta")));
        assertNotNull(suggestor.suggest(new LazyParsedQuery("contetb")));

        Config searcherConfig = Config.getConfig("searcher.properties");
        searcherConfig.set("compositeSearcher.useSpellCheckSuggestQuery", "true");
        searcherConfig.set("searcher.suggestQuerySearcher.dictionaryDir", spellDir.getFile().getAbsolutePath());
View Full Code Here

        new DidYouMeanIndexer().createSpellIndex("content".intern(), origDir, spellDir);
        WordQuerySuggestor suggestor = new WordQuerySuggestor(spellDir.getFile());

        assertNotNull(suggestor.suggest(new LazyParsedQuery("content")));
        assertNotNull(suggestor.suggest(new LazyParsedQuery("contenta")));
        assertNotNull(suggestor.suggest(new LazyParsedQuery("contetb")));

        Config searcherConfig = Config.getConfig("searcher.properties");
        searcherConfig.set("compositeSearcher.useSpellCheckSuggestQuery", "true");
        searcherConfig.set("searcher.suggestQuerySearcher.dictionaryDir", spellDir.getFile().getAbsolutePath());
        searcher = new CompositeSearcher();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.