Changeset 32508 for main

Show
Ignore:
Timestamp:
09.10.2018 19:35:40 (8 months ago)
Author:
ak19
Message:

Continued from previous 2 commits: Properly spelled new method name and some better comments.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/indexers/lucene-gs/src/org/greenstone/LuceneWrapper4/GS2LuceneQuery.java

    r32507 r32508  
    172172 
    173173        Query query = parseQuery(reader, query_parser, query_string, fuzziness); 
    174         query = recursiveRewriteQuery(query, reader);        
     174        query = recursivelyRewriteQuery(query, reader);      
    175175        // System.err.println("@@@@ final query class name: " + query.getClass()); 
    176176 
     
    473473    //    season* 
    474474    //    snail farm 
    475     // Idea for this method came from inspecting source code to BooleanQuery 
    476     // https://github.com/apache/lucene-solr/blob/master/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java 
     475    // Idea for the solution of recursively processing a BooleanQuery came from inspecting source code to BooleanQuery.java 
     476    //    https://github.com/apache/lucene-solr/blob/master/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java 
    477477    // which also does a recursive rewrite. Unfortunately, the existing BooleanQuery does not handle MultiTermQuery 
    478478    // subcomponents. 
    479     protected Query recursiveRewriteQuery(Query orig_query, IndexReader reader) throws java.io.IOException 
     479    protected Query recursivelyRewriteQuery(Query orig_query, IndexReader reader) throws java.io.IOException 
    480480    { 
    481481    //Query query = orig_query.rewrite(reader); 
     
    487487        for (BooleanClause clause : clauses) { 
    488488        Query subQuery = clause.getQuery(); 
    489         subQuery = recursiveRewriteQuery(subQuery, reader); 
     489        subQuery = recursivelyRewriteQuery(subQuery, reader); 
    490490        clause.setQuery(subQuery); 
    491491        } 
     
    557557        } 
    558558 
     559        // BooleanQuery.java recurses rewriting any query until it is identical before and after rewrite, 
     560        // see reference to "recursively rewrite" in 
     561        // https://github.com/apache/lucene-solr/blob/master/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java 
    559562        if(orig_query == query) { 
    560563        return query; 
    561564        } else { 
    562         return recursiveRewriteQuery(query, reader); 
     565        return recursivelyRewriteQuery(query, reader); 
    563566        } 
    564567    }