FTS query vs wildcard

Hi,

what is the difference between these two queries?
I am getting same results for both requests, so wondering what is special about wildcard.
1)
{
“explain”: true,
“fields”: [
“*”
],
“highlight”: {},
“query”: {
“query”: " * string * "
}
}

{
“explain”: true,
“fields”: [
" * "
],
“highlight”: {},
“query”: {
“wildcard”:" * string *",
“fields”:" * "
}
}

@sreeks??

@Rajeev_Bhat,
I can’t think of a difference in terms of functionality or end user experience here,
The first being a query string query is capable of expressing many types of queries in a special syntax and the latter is the plain wildcard query.
Query string query’s value is to be parsed internally to relevant query where as wildcard query’s value is an expression.
You may refer various query types here - https://docs.couchbase.com/server/6.5/fts/fts-query-types.html

Cheers!

So the search results will be same for both queries. Is it possible to use query string for all types of queries such as match phrase…etc except date queries?
thanks,
Rajeev

https://docs.couchbase.com/server/6.5/fts/query-string-queries.html

1 Like