Alfresco search wildcard doesn't work

cancel
Showing results for 
Search instead for 
Did you mean: 
AmineÖzil
Active Member

Alfresco search wildcard doesn't work

Hello everyone,

I am trying to execute this query :

{
    "query": {
        "language":"afts",
        "query":"PATH:\"/app:company_home//*\" AND =gda:typePJ:\"PJ-*\"  AND EXACTTYPE:\"cm:content\" AND cm:modified:[2020-01-01T00:00:00 TO 2100-06-30T01:00:00] AND ASPECT:\"marche:AspectExclusion\" AND NOT gda:etat:\"Trait\u00E9 en erreur\""
    },
    "paging":{
        "skipCount":0,
        "maxItems":50
    }
}
on the search API using postman, but the query result shows me documents that does not satisfy my conditions, for example  it shows a document that has a gda:typePJ = "PES PJ" which does not match the wildcard PJ-* !

I have tried to skip the "-" character by adding the "\" to the query but this did not work. I also have checked that the "gda" content model is indexed in Solr. Anyone knows why the query does not work as I wanted ?
6 Replies
AmineÖzil
Active Member

Re: Alfresco search wildcard doesn't work

Still waiting for an answer...

cesarista
Customer

Re: Alfresco search wildcard doesn't work

Hi:

Did you try without the = in the query ? Does this new query work as expected ?

I can't say what's happening, but and exact match with a wildcard does not have much sense for me.

You may use TO NOW instead of TO 2100... for cm:modified. I think you can ignore the PATH query too.

 

Try to do queries from the biggest query to smallest results, looking how the query results are filtered. This allows you to check each part of the sentence / condition that you are using.

Regards.

--C.

AmineÖzil
Active Member

Re: Alfresco search wildcard doesn't work

Hello @cesarista,
Thank you for your reply,

I have tried to do it without the =, and the result was the same nothing has changed. I think the reason why is that my metadata has a tokenized index, so that the blank spaces in the senteces causes this disfunction. Due to that, I want to know is there any way to force Alfresco Search Service to search for the exact phrase that contain blank spaces even if its metadata is tokenized ?

angelborroy
Alfresco Employee

Re: Alfresco search wildcard doesn't work

Do you have the exact term search enabled?

https://docs.alfresco.com/search-services/latest/config/indexing/#exact-term-search

By default, this feature is disabled.

Hyland Developer Evangelist
AmineÖzil
Active Member

Re: Alfresco search wildcard doesn't work

Yeah the cross locale configuration was done in Solr :
solrconf.png

angelborroy
Alfresco Employee

Re: Alfresco search wildcard doesn't work

Those lines need to be uncommented.

And you need to re-index after uncommenting them.

Hyland Developer Evangelist