You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by GitBox <gi...@apache.org> on 2019/03/21 11:02:26 UTC

[GitHub] [jena] afs commented on a change in pull request #536: Add support SurroundQueryParser to jena-text

afs commented on a change in pull request #536: Add support SurroundQueryParser to jena-text
URL: https://github.com/apache/jena/pull/536#discussion_r267706457
 
 

 ##########
 File path: jena-text/src/main/java/org/apache/jena/query/text/TextIndexLucene.java
 ##########
 @@ -401,25 +402,38 @@ protected Document doc(Entity entity) {
         }
     }
 
-    private QueryParser getQueryParser(Analyzer analyzer) {
-        switch(queryParserType) {
-            case "QueryParser":
-                return new QueryParser(docDef.getPrimaryField(), analyzer) ;
-            case "AnalyzingQueryParser":
-                // AnalyzingQueryParser is deprecated in Lucene 7, switching to QueryParser
-                return new QueryParser(docDef.getPrimaryField(), analyzer) ;
-            case "ComplexPhraseQueryParser":
-                return new ComplexPhraseQueryParser(docDef.getPrimaryField(), analyzer);
-            default:
-                log.warn("Unknown query parser type '" + queryParserType + "'. Defaulting to standard QueryParser") ;
-                return new QueryParser(docDef.getPrimaryField(), analyzer) ;
-        }
-    }
-
     private Query parseQuery(String queryString, Analyzer analyzer) throws ParseException {
-        QueryParser queryParser = getQueryParser(analyzer) ;
-        queryParser.setAllowLeadingWildcard(true) ;
-        Query query = queryParser.parse(queryString) ;
+    	Query query = null;
 
 Review comment:
   This method has a mix of tabs and spaces on each line. The Jena codebase uses spaces for indentation. Please could you change to spaces?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services