org.apache.lucene.util.QueryBuilder Java Examples

The following examples show how to use org.apache.lucene.util.QueryBuilder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LuceneQueryVisitor.java    From cxf with Apache License 2.0 5 votes vote down vote up
public LuceneQueryVisitor(Map<String, String> fieldsMap, String contentsFieldName, Analyzer analyzer) {
    super(fieldsMap);
    this.contentsFieldName = contentsFieldName;

    if (analyzer != null) {
        queryBuilder = new QueryBuilder(analyzer);
    }

}
 
Example #2
Source File: AlfrescoFieldType.java    From SearchServices with GNU Lesser General Public License v3.0 4 votes vote down vote up
static Query parseFieldQuery(QParser parser, Analyzer analyzer, String field, String queryText)
{
    // note, this method always worked this way (but nothing calls it?) because it has no idea of quotes...
    return new QueryBuilder(analyzer).createPhraseQuery(field, queryText);
}
 
Example #3
Source File: TestUnifiedHighlighterStrictPhrases.java    From lucene-solr with Apache License 2.0 4 votes vote down vote up
private PhraseQuery newPhraseQuery(String field, String phrase) {
  return (PhraseQuery) new QueryBuilder(indexAnalyzer).createPhraseQuery(field, phrase);
}
 
Example #4
Source File: LengthGoalBreakIteratorTest.java    From lucene-solr with Apache License 2.0 4 votes vote down vote up
private Query query(String qStr) {
  return new QueryBuilder(analyzer).createBooleanQuery(FIELD, qStr);
}
 
Example #5
Source File: TextField.java    From lucene-solr with Apache License 2.0 4 votes vote down vote up
static Query parseFieldQuery(QParser parser, Analyzer analyzer, String field, String queryText) {
  // note, this method always worked this way (but nothing calls it?) because it has no idea of quotes...
  return new QueryBuilder(analyzer).createPhraseQuery(field, queryText);
}