`
topcat
  • 浏览: 282485 次
  • 性别: Icon_minigender_1
  • 来自: 湖北武汉
社区版块
存档分类
最新评论

there are more terms than documents in field "name", but it's impossible to sort

    博客分类:
  • java
阅读更多

在使用solr的排序时出现了类似下面的异常:
there are more terms than documents in field "name", but it's impossible to sort on tokenized fields
name在solr中为text型字段
根据
http://lucene.apache.org/java/3_0_0/api/core/org/apache/lucene/search/Sort.html

Encapsulates sort criteria for returned hits.

The fields used to determine sort order must be carefully chosen. Documents must contain a single term in such a field, and the value of the term should

indicate the document's relative position in a given sort order. The field must be indexed, but should not be tokenized, and does not need to be stored

(unless you happen to want it back with the rest of your document data). In other words:

document.add (new Field ("byNumber", Integer.toString(x), Field.Store.NO, Field.Index.NOT_ANALYZED));


的描述,sort的字段是"should not be tokenized",而solr中的配置是对text字段进行了tokeniz了的因此会出现类似下面的异常:
there are more terms than documents in field "name", but it's impossible to sort on tokenized fields

这里是nabble上一个用户关于这方面的问题
http://old.nabble.com/Exception-when-field-sort.-td21302894.html

0
0
分享到:
评论

相关推荐

    解决docker报错There are no more lookback devices available

    解决docker报错There are no more lookback devices available

    A Practical Guide to Designing with Data.pdf

    Itʼs impossible to look at a table of fifteen petabytes of information – there has to be a graphical representation for anyone to comprehend data at this volume. This is what excites me: the ...

    算法导论第三版 英文版

    puters, there are even more algorithms, and algorithms lie at the heart of computing. This book provides a comprehensive introduction to the modern study of com- puter algorithms. It presents many ...

    a programmer's companion to algorithm analysis

    However, there are no books that look systematically at the gap separating the theory of algorithms and software engineering, even though many things can go wrong in taking several algorithms and ...

    How to do almost everything In active directory via C#

    When it comes to programmatically accessing Microsoft's Active Directory a lot of people seem to have quite a difficult time tying all the pieces together to accomplish exactly what they want to....

    NameService

    A name is always resolved relative to a context — there are no absolute names. Because a context is like any other object, it can also be bound to a name in a naming context. Binding contexts in ...

    Google C++ Style Guide(Google C++编程规范)高清PDF

    In some cases there might be good arguments for changing certain style rules, but we nonetheless keep things as they are in order to preserve consistency. Another issue this guide addresses is that...

    解决there are inconsistent line endings

    解决there are inconsistent line endings

    计算机网络第六版答案

    but the time when loss first occurs will be different from one experiment to the next due to the randomness in the emission process. 22. Five generic tasks are error control, flow control, ...

    Android代码-domino

    Domino pieces and game state is working OK, but there are more than a few things missing. First, it's not very pretty. It's in OpenGL, although the perspective is fixed and not very appealing. I ...

    Mastering+JavaScript+Functional+Programming-Packt+Publishing(2017).epub

    It's easy to apply a given function from some package or other, but by coding everything out (a vanilla FP, if you wish), it's my belief that you get to understand things more deeply. Also, as I will...

    Mastering+JavaScript+Functional+Programming-Packt+Publishing(2017).pdf

    and connecting them in simple ways to produce more understandable and more easily tested code. Thus, given the increased complexity of today's web applications, it's logical that a safer, cleaner way ...

    2008年6月大学英语六级A卷真题

    “People will come to expect that injured or diseased organs are meant to be repaired from within, in much the same way that we fix an appliance or automobile: by replacing the damaged part with a ...

    Fullstack React - The Complete Guide to React JS and Friends

    With such an active community, there are so many updates it feels impossible to know about what's best and what's just noise. How does it all fit together? React is a modular ecosystem but API docs ...

    端口查看工具

    are used for displaying the country name in the 'Remote IP Country' column. * Version 1.92: o When choosing 'Clear Log File' option, CurrPorts now asks you whether you want to clear the log, in ...

    Locker doors

    Locker doors There are n lockers in a hallway numbered sequentially from 1 to n. Initially, all the locker doors are closed

    UE(官方下载)

    Have you ever built a complex Perl-style regular expression, only to find that it matches much more data than you anticipated? If you've ever found yourself pulling your hair out trying to build the ...

    a project model for the FreeBSD Project.7z

    As of this writing, there are more than 12600 ports available. [2] , ranging from web servers to games, programming languages and most of the application types that are in use on modern computers. ...

    Coupled-Field Analysis Guide

    field introduces thermal strains in the structural field, but the structural strains generally do not affect the temperature distribution. Thus, there is no need to iterate between the two field ...

Global site tag (gtag.js) - Google Analytics