You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Erick Erickson (Jira)" <ji...@apache.org> on 2020/08/07 13:45:00 UTC

[jira] [Resolved] (SOLR-13381) Unexpected docvalues type SORTED_NUMERIC Exception when grouping by a PointField facet

     [ https://issues.apache.org/jira/browse/SOLR-13381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Erick Erickson resolved SOLR-13381.
-----------------------------------
    Resolution: Information Provided

First of all, any time you change your schema you should re-index from scratch. There are a very few exceptions to this rule, and changing field types is not one of them.

That means completely removing your index. If you can't delete your collection and start over, I strongly advise that you actually create a new collection and index to that after the schema changes, after which you can create an alias.

Even if you haven't changed type, this partcular error often results from changing the multiValued attribute on the field. This is another schema change that requires re-indexing from scratch as outlined above.

As for Trie/Point, Trie has, indeed, been deprecated in Lucene. Points-based fields are superior for range queries. However, they are slower for individual value lookup, i.e. numeric_field:1. Your choices are

1> go ahead and use Trie fields. They'll be supported for some time.

2> use point fields if you can live with the slowdown mentioned above. This doesn't become apparent unless you're looking at a lot of values.

3> I know this sounds weird, but use a copyField to a string-based field for individual lookups and when you need that functionality, search on that.

Please use the user's list for questions before raising a JIRA. http://lucene.apache.org/solr/community.html#mailing-lists-irc there are links to both Lucene and Solr mailing lists there.

> Unexpected docvalues type SORTED_NUMERIC Exception when grouping by a PointField facet
> --------------------------------------------------------------------------------------
>
>                 Key: SOLR-13381
>                 URL: https://issues.apache.org/jira/browse/SOLR-13381
>             Project: Solr
>          Issue Type: Bug
>          Components: faceting
>    Affects Versions: 7.0, 7.6, 7.7, 7.7.1
>         Environment: solr, solrcloud
>            Reporter: Zhu JiaJun
>            Priority: Major
>         Attachments: SOLR-13381.patch
>
>
> Hey,
> I got an "Unexpected docvalues type SORTED_NUMERIC" exception when I perform group facet on an IntPointField. Debugging into the source code, the cause is that internally the docvalue type for PointField is "NUMERIC" (single value) or "SORTED_NUMERIC" (multi value), while the TermGroupFacetCollector class requires the facet field must have a "SORTED" or "SOTRTED_SET" docvalue type: [https://github.com/apache/lucene-solr/blob/2480b74887eff01f729d62a57b415d772f947c91/lucene/grouping/src/java/org/apache/lucene/search/grouping/TermGroupFacetCollector.java#L313]
>  
> When I change schema for all int field to TrieIntField, the group facet then work. Since internally the docvalue type for TrieField is SORTED (single value) or SORTED_SET (multi value).
> Regarding that the "TrieField" is depreciated in Solr7, please help on this grouping facet issue for PointField. I also commented this issue in SOLR-7495.
>  
> In addtional, all place of "${solr.tests.IntegerFieldType}" in the unit test files seems to be using the "TrieintField", if change to "IntPointField", some unit tests will fail, for example: [https://github.com/apache/lucene-solr/blob/3de0b3671998cc9bc723d10f1b31ce48cbd4fa64/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java#L417]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org