Class LuceneSiteTextSearchSpanQueryBuilder
- java.lang.Object
-
- com.atlassian.confluence.internal.search.v2.lucene.LuceneSiteTextSearchSpanQueryBuilder
-
public class LuceneSiteTextSearchSpanQueryBuilder extends Object
Relocation from confluence-search plugin.- Since:
- 6.16.0
-
-
Field Summary
Fields Modifier and Type Field Description static int
BASE_SLOP
static int
SHINGLE_SIZE
-
Constructor Summary
Constructors Constructor Description LuceneSiteTextSearchSpanQueryBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.base.Optional<org.apache.lucene.search.Query>
getQuery(String field, String queryString, org.apache.lucene.analysis.Analyzer analyzer)
Generates span queries (wrapped in a boolean query if needed) for the given queryString.
-
-
-
Field Detail
-
BASE_SLOP
public static final int BASE_SLOP
- See Also:
- Constant Field Values
-
SHINGLE_SIZE
public static final int SHINGLE_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getQuery
public com.google.common.base.Optional<org.apache.lucene.search.Query> getQuery(String field, String queryString, org.apache.lucene.analysis.Analyzer analyzer)
Generates span queries (wrapped in a boolean query if needed) for the given queryString.Given the query "one two three" will return the queries SpanNear("one two") OR SpanNear("one three") OR SpanNear("two three")
Won't generate span queries for more than 6 tokens.
- Parameters:
field
- fieldqueryString
- querystring used to generate the queryanalyzer
- analyzer- Returns:
- Query or absent if more than 6 tokens in the queryString
-
-