When using Exalead as the full-text search engine the system first tries to convert a full-text query into a single Exalead one, if this fails it then try to convert the original query into a combination of an Exalead and SQL queries, if this fail as well the query cannot be executed and the system generates an error.
For example:
gn4:story[fn:fullText(nav:text, 'Obama')]
searches by object type and the entire full-text indexed content, this is translated in the single Exalead query:
corporate/tree=="Top/Source/story" AND ("Obama")
Another example – full text within a specific folder:
gn4:story[fn:fullText(nav:text,'Obama') and gn4:folderRef/@idref='obj8']
searches by object type, full-text indexed content and folder reference – all conditions supported by Exalead with the standard schema, so also this query becomes a pure Exalead one:
corporate/tree=="Top/Source/story" AND ("Obama") AND folderRef==8
Third example – full text within a specific folder and a minimum word count:
gn4:story[fn:fullText(nav:text,'Obama') and gn4:folderRef/@idref='obj8' and @nWords>500]
the number of words is not full-text indexed in the standard schema, so this query cannot be executed entirely by Exalead. The system splits it into two parts: pure full-text:
gn4:story[fn:fullText(nav:text,'Obama')]
and remaining conditions:
gn4:story[gn4:folderRef/@idref='obj8' and @nWords>500]
and converts the first part to an Exalead query and the second to a SQL one. The system then executes the Exlead query and filter the result using the SQL one. Note that the test on the folder is now in the second – SQL – query.
The sort must be executed always by the Exalead query, so all the sort conditions must use attributes that are full-text indexed and sortable by Exalead.