Is it possible to sort ignoring case?
My X-Query looks something like this:
/A/B sortall(…/name)
and I’d like it to return items in a case-insensitive order.
It does not appear that I can include any functions in the sortall clause, otherwise I could fake case insensitivity with a translate function (assuming Tamino supports the translate function).
Thanks!
-Patrick
Hi,
In the schema editor for TSD3 and TSD4 schemas you can define a Collation on the name field. If you specify a collation and a suitable collation language (I used “en_GB”) you can affect the physical sequence in which the sorted values are returned.
HTH.
Sorry, I have this question too…
I change the Collation to “yes” in Tamino’s Schema Editor and change the Collation language to “en_GB” and then define the schema again to an existing database, not work. Do I need to unload and reload all the data?
I still get “AIDS” sorted ascendingly before “Accidents”. Can anyone teach me in a more detail way?
Thank you very much!
Lun
You need to recreate index using the _admin command
Finn
So, can you post how to recreate the index??
I can’t find any documentation about _admin command, I know nothing about it.
Thanks!
Lun
Have a look in the documentation in the chapter:
“Requests using X-Machine Commands”
_admin=ino:RecreateIndex
which of course takes some parameters
be aware that there is both a RecreateIndex and a RecreateTextIndex function.
Finn
Thank you very much Finn! Get it works now…
But after then, I can’t use [subject between ‘A’, ‘A~’] as posted below,
http://tamino.forums.softwareag.com/viewtopic.php?p=8289
the query return no data…
Thanks a lot!!
Lun
Hi Lun,
Can’t quite figure out which query you mean ?
Finn
Hi,
In more precise, I have a normal field “subject” that I used to use the query
/article[subject between ‘A’, ‘A~’] to find all the elements that start exactly with a ‘A’. Due to the sorting issue described in this thread, I modified the field to Collation=“yes” and Collation Language=“en_GB”, I fixed the sorting issue.
But after then, I found that my query “/article[subject between ‘A’, ‘A~’]” return no data (it’s working well before I modified the Collation setting). I have already tried RecreateIndex and RecreateTextIndex, still not work.
Because the query "/article[subject ~= ‘A*’] will include result like “You And Me”, I have started another thread
http://tamino.forums.softwareag.com/viewtopic.php?p=8289
to ask help previously.
Best regards,
Lun