04-11-2024 09:31 PM
I have Alfresco Community v23.1.0
I'm using Postman to test my query. This returns 4 results:
{
"query": {
"query":"=tboacc:USERID_EDW:U92XXX"
},
"include": ["aspectNames", "properties", "isLink"]
}
One of the results has this property:
"tboacc:CLEARED_DATE_XXX": "2022-01-12T00:00:00.000+0000",
In Alfresco Node Browser the value is showing as datetime like this:
tboacc:CLEARED_DATE_XXX d:datetime 12 Jan 2022 00:00:00 GMT+0000 (UTC)
What is the correct syntax for finding this document using tboacc:CLEARED_DATE_XXX?
This returns 0 results:
{
"query": {
"query":"=tboacc:CLEARED_DATE_XXX:\"2022-01-12T00:00:00.000+0000\""
},
"include": ["aspectNames", "properties", "isLink"]
}
This returns 0 results:
{
"query": {
"query":"=tboacc:CLEARED_DATE_XXX:\"12 Jan 2022 00:00:00 GMT+0000 (UTC)\""
},
"include": ["aspectNames", "properties", "isLink"]
}
Also, what is the syntax for searching a date range?
04-15-2024 07:22 AM
Hi,
if using Solr check this https://docs.alfresco.com/search-services/latest/using/#search-for-ranges .
I know, in this link there are not clear examples on how to do it with dates, but in this case it works in the same way in the search-enterprise .
Use the first link as documentation for every different query syntax problem
04-17-2024 06:14 PM
Hello, robinp,
I'm following the syntax you suggested but it's still returning 0 results. Here's what I'm trying:
This returns 100 records (53 with "ncispolicy_Number": "0202020202")
{
"query": {
"query":"=ncispolicy_Number:'0202020202'",
"language": "afts"
}
}
This returns 71 records:
{
"query": {
"query":"ncisp:F_EntryDate:['2024-01-12' TO '2024-01-13']",
"language": "afts"
},
"include": ["aspectNames", "properties", "isLink"]
}
But this returns 0 records:
{
"query": {
"query":"=ncispolicy_Number:'0202020202' AND ncisp:F_EntryDate:['2024-01-12' TO '2024-01-13']",
"language": "afts"
},
"include": ["aspectNames", "properties", "isLink"]
}
How do I combine a search for a single term with a date range search?
ncisp:F_EntryDate is Data Type d:datetime and has Indexing: Basic.
04-18-2024 06:04 AM
Hi,
The query syntax you are using seems to be right.
You confirm this by testing searchability on any node via cm:name:"XXX" and cm:created:['20XX-XX-XX' TO '20YY-YY-YY'].
I assume that there are nodes compatible with the search you are carrying out, so:
Explore our Alfresco products with the links below. Use labels to filter content by product module.