[ 
https://issues.apache.org/jira/browse/IGNITE-4511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15859419#comment-15859419
 ] 

ASF GitHub Bot commented on IGNITE-4511:
----------------------------------------

GitHub user AMashenkov opened a pull request:

    https://github.com/apache/ignite/pull/1513

    IGNITE-4511: Set QueryIndexType.SORTED by default for an index 

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gridgain/apache-ignite ignite-4511-1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ignite/pull/1513.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1513
    
----
commit 0f407b87814db31327ec2fbf7163892b0e03d407
Author: Andrey V. Mashenkov <[email protected]>
Date:   2017-01-26T15:01:11Z

    Fixed

commit c0d5d8844a3619c401712f0825b44399077f5f0b
Author: Andrey V. Mashenkov <[email protected]>
Date:   2017-01-27T13:31:56Z

    Test fixed.

commit 9d5ab472314c8f0aa0a3badcf069ebde95046248
Author: Andrey V. Mashenkov <[email protected]>
Date:   2017-01-27T18:56:46Z

    Minors.

commit 5af6c755fcb0507e7be19a9a37011fce467e01a9
Author: Andrey V. Mashenkov <[email protected]>
Date:   2017-01-30T08:48:13Z

    Minors.

----


> Set QueryIndexType.SORTED by default for an index 
> --------------------------------------------------
>
>                 Key: IGNITE-4511
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4511
>             Project: Ignite
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 1.7
>            Reporter: Steve Hostettler
>            Assignee: Andrew Mashenkov
>            Priority: Minor
>              Labels: fulltext, sql
>             Fix For: 2.0
>
>
> The code snippet below creates a index of type FULL TEXT which much slower 
> and that I do not need;
> QueryIndex idx1 = new QueryIndex();
> LinkedHashMap<String, Boolean> idxFlds1 = new LinkedHashMap<>();
> idxFlds1.put("field1", true);
> idxFlds1.put("field2", true);
> idx1.setFields(idxFlds1);
> idxs.add(idx1);
> To avoid this I must explicitly set
> idx1.setIndexType(QueryIndexType.SORTED);
> This is because with the above code snippet, the Index Type is null and that 
> null is interpreted as FULL TEXT in  GridQueryProcessor.java 
>  if (idx.getIndexType() == QueryIndexType.SORTED || idx.getIndexType() == 
> QueryIndexType.GEOSPATIAL) { 
> .... 
> } else { 
> assert idx.getIndexType() == QueryIndexType.FULLTEXT; 
>                     for (String field : idx.getFields().keySet()) { 
>                         String alias = aliases.get(field); 
>                         if (alias != null) 
>                             field = alias; 
>                         d.addFieldToTextIndex(field); 
>                     } 
> } 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to