=== modified file 'rules/annotations/index_selection.rules'
--- old/rules/annotations/index_selection.rules	2020-10-05 20:50:25 +0000
+++ new/rules/annotations/index_selection.rules	2021-02-09 20:22:00 +0000
@@ -4,7 +4,7 @@
 ** Module   : index_selection.rules
 ** Abstract : duplicate the index selection decision of the Progress compiler 
 **
-** Copyright (c) 2004-2020, Golden Code Development Corporation.
+** Copyright (c) 2004-2021, Golden Code Development Corporation.
 **
 ** _#_ _I_ __Date__ __JPRM__ ____________________________Description_____________________________
 ** 001 GES 20051014   @23066 Duplicates the index selection decision of
@@ -113,6 +113,7 @@
 ** 041 OM  20190213          Extracted UDF calls as P2JQuery.Parameters.
 **                           Fixed conversion of sorting by extent fields with non-constant index.
 ** 042 ECF 20200906          New ORM implementation.
+** 043 IAS 20210209          Do not use word index field for sorting
 */
 -->
 
@@ -948,11 +949,13 @@
                   <action>putNote("matchtype", #(long) prog.range_match)</action>
                </rule>
                
+ <!-- 
                <rule>matchType == prog.kw_contains
                   <action>isw.addWordMatch(sname)</action>
                   <action>putNote("matchtype", #(long) prog.word_match)</action>
                </rule>
-            </rule>
+ -->
+             </rule>
          </rule>
       </rule>
       

=== modified file 'src/com/goldencode/p2j/convert/IndexSelectionWorker.java'
--- old/src/com/goldencode/p2j/convert/IndexSelectionWorker.java	2020-09-23 23:47:02 +0000
+++ new/src/com/goldencode/p2j/convert/IndexSelectionWorker.java	2021-02-09 20:22:00 +0000
@@ -3,7 +3,7 @@
 ** Abstract : provides access to schema index data and helpers to calc the 
 **            actual implicit index in use
 **
-** Copyright (c) 2005-2020, Golden Code Development Corporation.
+** Copyright (c) 2005-2021, Golden Code Development Corporation.
 **
 ** -#- -I- --Date-- --JPRM-- -----------------------------------Description-----------------------------------
 ** 001 GES 20051013   @23061 Provides access to schema index data and
@@ -58,6 +58,7 @@
 **                           current class (thus we need to recursively load .p2o files).
 ** 022 CA  20200412          Added incremental conversion support.
 ** 023 OM  20200924          P2JIndexComponent carries multiple information to avoid map lookups for them.
+** 024 IAS 20210209          Do not use word index field for sorting
 */
 
 /*
@@ -908,7 +909,12 @@
             P2JIndex idx = iter.next();
             
             // remember the complete list in case we find no matches
-            all.add(idx);
+            // word index is used for ordering only if there is a CONTAINS
+            // operator for a corresponding field
+            if (!idx.isWord()) 
+            {
+               all.add(idx);
+            }
          }
          
          return all;

