Package com.bericotech.clavin.index

Examples of com.bericotech.clavin.index.BinarySimilarity


        index = FSDirectory.open(indexDir);

        indexSearcher = new IndexSearcher(DirectoryReader.open(index));

        // override default TF/IDF score to ignore multiple appearances
        indexSearcher.setSimilarity(new BinarySimilarity());

        // run an initial throw-away query just to "prime the pump" for
        // the cache, so we can accurately measure performance speed
        // per: http://wiki.apache.org/lucene-java/ImproveSearchingSpeed
        indexSearcher.search(new AnalyzingQueryParser(Version.LUCENE_4_9, INDEX_NAME.key(),
View Full Code Here


        // index employs simple lower-casing & tokenizing on whitespace
        indexAnalyzer = new WhitespaceLowerCaseAnalyzer();
        indexSearcher = new IndexSearcher(DirectoryReader.open(index));
       
        // override default TF/IDF score to ignore multiple appearances
        indexSearcher.setSimilarity(new BinarySimilarity());
       
        this.maxHitDepth = maxHitDepth;
        this.maxContextWindow = maxContextWindow;
       
        // run an initial throw-away query just to "prime the pump" for
View Full Code Here

        // index employs simple lower-casing & tokenizing on whitespace
        indexAnalyzer = new WhitespaceLowerCaseAnalyzer();
        indexSearcher = new IndexSearcher(DirectoryReader.open(index));
       
        // override default TF/IDF score to ignore multiple appearances
        indexSearcher.setSimilarity(new BinarySimilarity());
       
        this.maxHitDepth = maxHitDepth;
        this.maxContextWindow = maxContextWindow;
       
        // run an initial throw-away query just to "prime the pump" for
View Full Code Here

    // index employs simple lower-casing & tokenizing on whitespace
    indexAnalyzer = new WhitespaceLowerCaseAnalyzer();
    indexSearcher = new IndexSearcher(DirectoryReader.open(index));
   
    // override default TF/IDF score to ignore multiple appearances
    indexSearcher.setSimilarity(new BinarySimilarity());
   
    this.maxHitDepth = maxHitDepth;
    this.maxContextWindow = maxContextWindow;
   
    // run an initial throw-away query just to "prime the pump" for
View Full Code Here

TOP

Related Classes of com.bericotech.clavin.index.BinarySimilarity

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.