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

tieBreakerMultiplier is broken #73

Closed
clintongormley opened this issue Mar 19, 2010 · 3 comments
Closed

tieBreakerMultiplier is broken #73

clintongormley opened this issue Mar 19, 2010 · 3 comments

Comments

@clintongormley
Copy link

Hiya

The query below just hangs. Without the tieBreakerMultiplier it works fine:

curl -XGET 'http://127.0.0.2:9200/ia_object/notice/_search?searchType=dfs_query_then_fetch'  -d '
{
   "sort" : [
      "score"
   ],
   "fields" : [],
   "query" : {
      "tieBreakerMultiplier" : 0.7,
      "disMax" : {
         "queries" : [
            {
               "field" : {
                  "text" : {
                     "boost" : 1,
                     "query" : "andrew margaret"
                  }
               }
            },
            {
               "field" : {
                  "name" : {
                     "boost" : 1,
                     "query" : "andrew margaret"
                  }
               }
            }
         ]
      }
   },
   "from" : 0,
   "explain" : 1,
   "size" : 300
}
'

ta

clint

@kimchy
Copy link
Member

kimchy commented Mar 19, 2010

can you add sample data that you used with this query?

@clintongormley
Copy link
Author

here's a complete test case:

curl -XGET 'http://127.0.0.1:9200/_cluster/nodes' 
# {
#    "clusterName" : "iAnnounce",
#    "nodes" : {
#       "getafix-9780" : {
#          "httpAddress" : "inet[/127.0.0.2:9200]",
#          "dataNode" : true,
#          "transportAddress" : "inet[getafix.traveljury.com/127.0.
# >          0.2:9300]",
#          "name" : "Coldblood"
#       }
#    }
# }


curl -XPUT 'http://127.0.0.2:9200/ia_object/site/1'  -d '
{
   "created" : "2010-01-11 18:46:17",
   "ancestor_ids" : [],
   "status" : "active",
   "last_modified" : "2010-01-11 18:46:17",
   "id" : "1",
   "parent_id" : 0,
   "creator_id" : 0
}
'
# {
#    "ok" : true,
#    "_index" : "ia_object",
#    "_id" : "1",
#    "_type" : "site"
# }


curl -XPUT 'http://127.0.0.2:9200/ia_object/group/2'  -d '
{
   "ancestor_ids" : [],
   "status" : "active",
   "last_modified" : "2010-01-11 18:46:17",
   "name" : "All Scrapers",
   "parent_id" : 0,
   "text_id" : "all_scrapers",
   "created" : "2010-01-11 18:46:17",
   "id" : "2",
   "creator_id" : 0
}
'
# {
#    "ok" : true,
#    "_index" : "ia_object",
#    "_id" : "2",
#    "_type" : "group"
# }


curl -XPUT 'http://127.0.0.2:9200/ia_object/group/3'  -d '
{
   "ancestor_ids" : [
      "1"
   ],
   "status" : "active",
   "last_modified" : "2010-01-11 18:46:17",
   "name" : "All iAnnounce Scrapers",
   "parent_id" : "1",
   "text_id" : "iannounce_all_scrapers",
   "created" : "2010-01-11 18:46:17",
   "id" : "3",
   "creator_id" : 0
}
'
# {
#    "ok" : true,
#    "_index" : "ia_object",
#    "_id" : "3",
#    "_type" : "group"
# }


curl -XPUT 'http://127.0.0.2:9200/ia_object/group/4'  -d '
{
   "ancestor_ids" : [],
   "status" : "active",
   "last_modified" : "2010-01-11 18:46:17",
   "name" : "All Notices",
   "parent_id" : 0,
   "text_id" : "all_notices",
   "created" : "2010-01-11 18:46:17",
   "id" : "4",
   "creator_id" : 0
}
'
# {
#    "ok" : true,
#    "_index" : "ia_object",
#    "_id" : "4",
#    "_type" : "group"
# }

curl -XGET 'http://127.0.0.2:9200/ia_object/notice/_search?searchType=dfs_query_then_fetch'  -d '
{
   "query" : {
      "tieBreakerMultiplier" : 0.7,
      "disMax" : {
         "queries" : [
            {
               "field" : {
                  "text" : {
                     "boost" : 1.1,
                     "query" : "andrew margaret"
                  }
               }
            },
            {
               "field" : {
                  "name" : {
                     "boost" : 1,
                     "query" : "andrew margaret"
                  }
               }
            }
         ]
      }
   }
}
'

@clintongormley
Copy link
Author

Fixed - tieBreakerMultiplier was used at the wrong level. Now the server throws an error instead of hanging

rmuir pushed a commit to rmuir/elasticsearch that referenced this issue Nov 8, 2015
When we want to force some values, we need to set those using `_field` where `field` is the field name we want to force:

```
{
  "file": {
    "_name": "myfilename.txt"
  }
}
```

But to set the content itself, we use `content` field name.

```
{
  "file": {
    "content": "VGhpcyBpcyBhbiBlbGFzdGljc2VhcmNoIG1hcHBlciBhdHRhY2htZW50IHRlc3Qu",
    "_name": "myfilename.txt"
  }
}
```

For consistency, we set `_content` instead:

```
{
  "file": {
    "_content": "VGhpcyBpcyBhbiBlbGFzdGljc2VhcmNoIG1hcHBlciBhdHRhY2htZW50IHRlc3Qu",
    "_name": "myfilename.txt"
  }
}
```

Closes elastic#73.

(cherry picked from commit 2e6be20)
rmuir pushed a commit to rmuir/elasticsearch that referenced this issue Nov 8, 2015
In elastic#73, we deprecated `content` field in favor of `_content` field.

In plugin version 2.4.0, we can now remove the old field name.

Closes elastic#75.

(cherry picked from commit 7a0f838)
maabernethy pushed a commit to maabernethy/elasticsearch that referenced this issue Mar 20, 2017
henningandersen pushed a commit to henningandersen/elasticsearch that referenced this issue Jun 4, 2020
with this commit we lower the time window for dashboard queries from 50%
to 25% and also lower their target throughput to better match real world
use cases.
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
mindw pushed a commit to mindw/elasticsearch that referenced this issue Sep 5, 2022
…est elastic#73)

Media Manager Lambda: fixed iteration over tags

* fixed iteration over tags

Approved-by: Rich Nessel
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