Full text Query
Hello!
I'm trying to search using a full-text query.
As I have to search into a specific field I'm trying to use the property: ecm:fulltext.somefield = 'something' but it doesn't work for me.
Any idea?
Here is my code: ecm:fulltext.act:subject = 'string*'
Hello,
You need to update the default ES config of your Nuxeo instance so that the full text works on your custom field: https://doc.nuxeo.com/nxdoc/configuring-the-elasticsearch-mapping/#adding-a-new-full-text-field.
Regards
I have updated what you said. However, when I try to search with the following queries, I don't get any result:
Query 1: SELECT * FROM Document WHERE ecm:mixinType != 'HiddenInNavigation' AND ecm:isProxy = 0 AND ecm:isVersion = 0 AND ecm:isTrashed = 0 AND ecm:fulltext.act:subtitle = 'prueba'
Query 2: SELECT * FROM Document WHERE /+ES: INDEX(act:subtitle.fulltext) ANALYZER(fulltext) OPERATOR(match) / act:subtitle= 'prueba'
In order to form the second one, I used the following property from the elasticsearch-doc-mapping.json :
"act:subtitle": {
"type": "text",
"fielddata": true,
"fields": {
"fulltext": {
"analyzer": "fulltext",
"type": "text"
},
"lowercase": {
"type": "text",
"analyzer": "lowercase_analyzer"
}
}
}"
The value of act:subtitle is 'prueba de subtítulo' and if I make my search with the whole value I get what I want..
Do you know where is the error?
Thanks again
Regards