Package com.redis.vl.query
Class TextQuery
java.lang.Object
com.redis.vl.query.TextQuery
Full-text search query
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TextQuery
Create a text query without a filter expression.- Parameters:
text
- The text to search fortextField
- The field to search inscorer
- The scoring algorithm (e.g., "BM25", "TF IDF")returnFields
- List of fields to return in results
-
TextQuery
public TextQuery(String text, String textField, String scorer, Filter filterExpression, List<String> returnFields) Create a text query with all parameters.- Parameters:
text
- The text to search fortextField
- The field to search inscorer
- The scoring algorithmfilterExpression
- Optional filter to applyreturnFields
- List of fields to return in results
-
-
Method Details
-
getText
Get the search text- Returns:
- Search text
-
getTextField
Get the text field to search in- Returns:
- Text field name
-
getScorer
Get the scoring algorithm- Returns:
- Scorer name
-
getFilterExpression
Get the filter expression- Returns:
- Filter expression or null
-
getReturnFields
Get the return fields- Returns:
- List of fields to return or null
-
toQueryString
Build the query string for Redis text search- Returns:
- Query string
-
toString
-