ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-4511) Set QueryIndexType.SORTED by default for an index
Date Thu, 26 Jan 2017 15:05:25 GMT

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

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

Github user AMashenkov closed the pull request at:

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


> 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
>         Environment: Windows Server + Java 8
>            Reporter: Steve Hostettler
>            Assignee: Andrew Mashenkov
>            Priority: Minor
>              Labels: fulltext, sql
>             Fix For: 1.9
>
>
> 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.4#6332)

Mime
View raw message