Hello,
I’m trying to search with a mustNot query in order to retrieve my users not deleted, there is my code :
$opts = new SearchOptions();
$opts->fields(["*"])->limit($limit);
$interval_query = (new DateRangeSearchQuery())
->start(Carbon::now()->subYear()->toDateTimeString())
->end(Carbon::now()->toDateTimeString())
->field('deleted_at');
$disjunction_query = new DisjunctionSearchQuery([$interval_query]);
$bool_query = new BooleanSearchQuery();
$bool_query->mustNot($disjunction_query);
$this->connection->search('applicant', $bool_query, $opts);
Here is my index :
"type": "fulltext-index",
"name": "applicant",
"uuid": "5262efb1c39dfc69",
"sourceType": "couchbase",
"sourceName": "applicant",
"sourceUUID": "10c3342d3bae8b146a66d95596326edd",
"planParams": {
"maxPartitionsPerPIndex": 171,
"indexPartitions": 6
},
"params": {
"doc_config": {
"docid_prefix_delim": "",
"docid_regexp": "",
"mode": "type_field",
"type_field": "collection"
},
"mapping": {
"analysis": {
"analyzers": {
"email_to_lower": {
"char_filters": [
"asciifolding"
],
"token_filters": [
"to_lower"
],
"tokenizer": "single",
"type": "custom"
},
"name_to_lower": {
"tokenizer": "unicode",
"type": "custom"
},
"uuid_to_lower": {
"char_filters": [
"asciifolding"
],
"token_filters": [
"to_lower"
],
"tokenizer": "single",
"type": "custom"
}
}
},
"default_analyzer": "standard",
"default_datetime_parser": "dateTimeOptional",
"default_field": "_all",
"default_mapping": {
"dynamic": true,
"enabled": false
},
"default_type": "_default",
"docvalues_dynamic": true,
"index_dynamic": true,
"store_dynamic": false,
"type_field": "_type",
"types": {
"applicant": {
"dynamic": false,
"enabled": true,
"properties": {
"applicant_id": {
"dynamic": false,
"enabled": true,
"fields": [
{
"analyzer": "uuid_to_lower",
"index": true,
"name": "applicant_id",
"store": true,
"type": "text"
}
]
},
"callback": {
"dynamic": false,
"enabled": true,
"fields": [
{
"analyzer": "simple",
"name": "callback",
"store": true,
"type": "text"
}
]
},
"created_at": {
"dynamic": false,
"enabled": true,
"fields": [
{
"include_term_vectors": true,
"name": "created_at",
"store": true,
"type": "datetime"
}
]
},
"deleted_at": {
"dynamic": false,
"enabled": true,
"fields": [
{
"date_format": "dateTimeOptional",
"include_term_vectors": true,
"name": "deleted_at",
"store": true,
"type": "datetime"
}
]
},
"company_uuid": {
"dynamic": false,
"enabled": true,
"fields": [
{
"analyzer": "uuid_to_lower",
"index": true,
"name": "company_uuid",
"store": true,
"type": "text"
}
]
},
"target_uuid": {
"dynamic": false,
"enabled": true,
"fields": [
{
"analyzer": "uuid_to_lower",
"index": true,
"name": "target_uuid",
"store": true,
"type": "text"
}
]
},
"updated_at": {
"dynamic": false,
"enabled": true,
"fields": [
{
"include_term_vectors": true,
"name": "updated_at",
"store": true,
"type": "datetime"
}
]
},
"user": {
"dynamic": false,
"enabled": true,
"properties": {
"email": {
"dynamic": false,
"enabled": true,
"fields": [
{
"analyzer": "email_to_lower",
"index": true,
"name": "email",
"store": true,
"type": "text"
}
]
},
"firstname": {
"dynamic": false,
"enabled": true,
"fields": [
{
"analyzer": "name_to_lower",
"index": true,
"name": "firstname",
"store": true,
"type": "text"
}
]
},
"lastname": {
"dynamic": false,
"enabled": true,
"fields": [
{
"analyzer": "name_to_lower",
"index": true,
"name": "lastname",
"store": true,
"type": "text"
}
]
},
"uuid": {
"dynamic": false,
"enabled": true,
"fields": [
{
"analyzer": "uuid_to_lower",
"index": true,
"name": "uuid",
"store": true,
"type": "text"
}
]
}
}
}
}
}
}
},
"store": {
"indexType": "scorch"
}
},
"sourceParams": {}
}
And it throws an error " Lcb_err_parsing_failure (208)" can you help me ?
Thanks in advance.