Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting on a text field hangs #32

Closed
clintongormley opened this issue Feb 19, 2010 · 2 comments
Closed

Sorting on a text field hangs #32

clintongormley opened this issue Feb 19, 2010 · 2 comments

Comments

@clintongormley
Copy link

{ sort: { text_field: {} }} just hangs - no response.

Doesn't matter if I create an explicit mapping or not, or search on one index/type combination or _all

Test script:
curl -XGET 'http://127.0.0.1:9200/_cluster/nodes'
curl -XDELETE 'http://127.0.0.2:9200/es_test/'
curl -XDELETE 'http://127.0.0.2:9200/es_test_2/'
curl -XPOST 'http://127.0.0.2:9200/_flush?refresh=true'
curl -XPUT 'http://127.0.0.2:9200/es_test/'
curl -XPUT 'http://127.0.0.2:9200/es_test_2/'
curl -XPOST 'http://127.0.0.2:9200/_flush?refresh=true'

curl -XPUT 'http://127.0.0.2:9200/es_test/type_1/1?opType=create'  -d '{
   "num" : 2,   "text" : "foo"}'
curl -XPUT 'http://127.0.0.2:9200/es_test/type_2/2?opType=create'  -d '{
   "num" : 3,   "text" : "foo"}'
curl -XPUT 'http://127.0.0.2:9200/es_test_2/type_1/3?opType=create'  -d '{
   "num" : 4,   "text" : "foo"}'
curl -XPUT 'http://127.0.0.2:9200/es_test_2/type_2/4?opType=create'  -d '{
   "num" : 5,   "text" : "foo"}'
curl -XPUT 'http://127.0.0.2:9200/es_test/type_1/5?opType=create'  -d '{
   "num" : 6,   "text" : "foo bar"}'
curl -XPUT 'http://127.0.0.2:9200/es_test/type_2/6?opType=create'  -d '{
   "num" : 7,   "text" : "foo bar"}'
curl -XPUT 'http://127.0.0.2:9200/es_test_2/type_1/7?opType=create'  -d '{
   "num" : 8,   "text" : "foo bar"}'
curl -XPUT 'http://127.0.0.2:9200/es_test_2/type_2/8?opType=create'  -d '{
   "num" : 9,   "text" : "foo bar"}'
curl -XPUT 'http://127.0.0.2:9200/es_test/type_1/9?opType=create'  -d '{
   "num" : 10,   "text" : "foo bar baz"}'
curl -XPUT 'http://127.0.0.2:9200/es_test/type_2/10?opType=create'  -d '{
   "num" : 11,   "text" : "foo bar baz"}'
curl -XPUT 'http://127.0.0.2:9200/es_test_2/type_1/11?opType=create'  -d '{
   "num" : 12,   "text" : "foo bar baz"}'
curl -XPUT 'http://127.0.0.2:9200/es_test_2/type_2/12?opType=create'  -d '{
   "num" : 13,   "text" : "foo bar baz"}'
curl -XPUT 'http://127.0.0.2:9200/es_test/type_1/13?opType=create'  -d '{
   "num" : 14,   "text" : "bar baz"}'
curl -XPUT 'http://127.0.0.2:9200/es_test/type_2/14?opType=create'  -d '{
   "num" : 15,   "text" : "bar baz"}'
curl -XPUT 'http://127.0.0.2:9200/es_test_2/type_1/15?opType=create'  -d '{
   "num" : 16,   "text" : "bar baz"}'
curl -XPUT 'http://127.0.0.2:9200/es_test_2/type_2/16?opType=create'  -d '{
   "num" : 17,   "text" : "bar baz"}'
curl -XPUT 'http://127.0.0.2:9200/es_test/type_1/17?opType=create'  -d '{
   "num" : 18,   "text" : "baz"}'
curl -XPUT 'http://127.0.0.2:9200/es_test/type_2/18?opType=create'  -d '{
   "num" : 19,   "text" : "baz"}'
curl -XPUT 'http://127.0.0.2:9200/es_test_2/type_1/19?opType=create'  -d '{
   "num" : 20,   "text" : "baz"}'
curl -XPUT 'http://127.0.0.2:9200/es_test_2/type_2/20?opType=create'  -d '{
   "num" : 21,   "text" : "baz"}'
curl -XPUT 'http://127.0.0.2:9200/es_test/type_1/21?opType=create'  -d '{
   "num" : 22,   "text" : "bar"}'
curl -XPUT 'http://127.0.0.2:9200/es_test/type_2/22?opType=create'  -d '{
   "num" : 23,   "text" : "bar"}'
curl -XPUT 'http://127.0.0.2:9200/es_test_2/type_1/23?opType=create'  -d '{
   "num" : 24,   "text" : "bar"}'
curl -XPUT 'http://127.0.0.2:9200/es_test_2/type_2/24?opType=create'  -d '{
   "num" : 25,   "text" : "bar"}'
curl -XPUT 'http://127.0.0.2:9200/es_test/type_1/25?opType=create'  -d '{
   "num" : 26,   "text" : "foo baz"}'
curl -XPUT 'http://127.0.0.2:9200/es_test/type_2/26?opType=create'  -d '{
   "num" : 27,   "text" : "foo baz"}'
curl -XPUT 'http://127.0.0.2:9200/es_test_2/type_1/27?opType=create'  -d '{
   "num" : 28,   "text" : "foo baz"}'
curl -XPUT 'http://127.0.0.2:9200/es_test_2/type_2/28?opType=create'  -d '{
   "num" : 29,   "text" : "foo baz"}'


curl -XPOST 'http://127.0.0.2:9200/_flush?refresh=true' 


curl -XGET 'http://127.0.0.2:9200/_all/_search'  -d '
{
   "sort" : {
      "text" : {}
   },
   "query" : {
      "matchAll" : {}
   }
}
'
@kimchy
Copy link
Member

kimchy commented Feb 20, 2010

Looked at it and found a problem in search "map reduce" logic where if just certain shards fail, the action will not finish. I have just pushed a fix.

The problem you have is the fact that when you sort on string types, you must have them not analyzed (in the type mapping). Lucene might still perform the sort when they are analyzed, but it will throw a runtime exception when it can't (and this is what happens on some of the shards).

As a side note, I am going to spend time the next days to return proper failure messages from all operations, and not just counters on shards that failed.

If you can verify on your end that it is solved, I can close this issue.

@clintongormley
Copy link
Author

Fixed ++

dadoonet added a commit that referenced this issue Jun 5, 2015
dadoonet added a commit that referenced this issue Jun 5, 2015
Fix missing lib in assembly. relative to #29.
Closes #33.
dadoonet added a commit that referenced this issue Jun 5, 2015
Closes #32.

(cherry picked from commit 4d17e47)
dadoonet pushed a commit that referenced this issue Jun 5, 2015
dadoonet added a commit that referenced this issue Jun 5, 2015
dadoonet added a commit that referenced this issue Jun 5, 2015
johtani added a commit that referenced this issue Jun 5, 2015
jpountz added a commit that referenced this issue Jun 9, 2015
With the current way that Java lists are wrapped into a Scriptable, all methods
that are not defined on the java.util.List interface are hidden. This pull
request makes NativeList extend NativeJavaObject in order to use reflection in
order to look up properties that would not be defined on the List interface.

Close #32
ywelsch pushed a commit to ywelsch/elasticsearch that referenced this issue Apr 24, 2018
Previously, each follower's has-the-leader-failed detector was passive, firing 
if it had not received a message from the leader sufficiently recently. This
may not detect asymmetric connectivity issues, and may not help in the 
situation where the follower has not yet joined the cluster fully.  Also the
leader only really cares about having a quorum of healthy followers, so would
not always take appropriate action if its connection with a single follower was
disrupted.

This change alters the behaviour to have the follower actively check that the 
leader is healthy, with a configurable number of retries allowed before
considering the leader to have failed. This also lets the follower check more 
things about the state of the leader before deciding on its health.
ClaudioMFreitas pushed a commit to ClaudioMFreitas/elasticsearch-1 that referenced this issue Nov 12, 2019
cbuescher pushed a commit to cbuescher/elasticsearch that referenced this issue Oct 2, 2023
With this commit we load all tracks from an external file.

Closes elastic#32
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants