Should filtering by type and type-specific search URL return different results?

I'm seeing something puzzling: I have a query that returns quite
different results depending on how I restrict the query by type.

(1) adding "filter": { "type": { "value": "my_type" } } into the query
(2) restricting the search in the URL : curl -XGET http://localhost:9200/index/my_type
...

I use a document level _boost that is seemingly ignored when the query
is run using (1). Shouldn't these two methods be equivalent? Or what
is the difference that I am missing?

On Mar 14, 11:27 am, James Wilson jwilson...@gmail.com wrote:

I'm seeing something puzzling: I have a query that returns quite
different results depending on how I restrict the query by type.

(1) adding "filter": { "type": { "value": "my_type" } } into the query
(2) restricting the search in the URL : curl -XGEThttp://localhost:9200/index/my_type
...

I use a document level _boost that is seemingly ignored when the query
is run using (1). Shouldn't these two methods be equivalent? Or what
is the difference that I am missing?

By "different results", you mean the same results, but in a different
order? I don't know what /index/my_type is translated into, but filter
results in general don't have a guaranteed order.

I mean totally different results, where a result with a huge document-
level boost is missing when using (1).

On Mar 14, 1:13 pm, Eric Jain eric.j...@gmail.com wrote:

On Mar 14, 11:27 am, James Wilson jwilson...@gmail.com wrote:

I'm seeing something puzzling: I have a query that returns quite
different results depending on how I restrict the query by type.

(1) adding "filter": { "type": { "value": "my_type" } } into the query
(2) restricting the search in the URL : curl -XGEThttp://localhost:9200/index/my_type
...

I use a document level _boost that is seemingly ignored when the query
is run using (1). Shouldn't these two methods be equivalent? Or what
is the difference that I am missing?

By "different results", you mean the same results, but in a different
order? I don't know what /index/my_type is translated into, but filter
results in general don't have a guaranteed order.

On Wed, 2012-03-14 at 11:27 -0700, James Wilson wrote:

I'm seeing something puzzling: I have a query that returns quite
different results depending on how I restrict the query by type.

(1) adding "filter": { "type": { "value": "my_type" } } into the query
(2) restricting the search in the URL : curl -XGET http://localhost:9200/index/my_type
...

I use a document level _boost that is seemingly ignored when the query
is run using (1). Shouldn't these two methods be equivalent? Or what
is the difference that I am missing?

Could you gist a complete curl example demonstrating the issue?

ta

clint

A recreation would be great. Note though, that hte field name that the type
uses is named "_type", not "type". When you search on
/index_name/type_name, the query executed is wrapped with a filter against
_type field.

On Fri, Mar 16, 2012 at 8:48 AM, Clinton Gormley clint@traveljury.comwrote:

On Wed, 2012-03-14 at 11:27 -0700, James Wilson wrote:

I'm seeing something puzzling: I have a query that returns quite
different results depending on how I restrict the query by type.

(1) adding "filter": { "type": { "value": "my_type" } } into the query
(2) restricting the search in the URL : curl -XGET
http://localhost:9200/index/my_type
...

I use a document level _boost that is seemingly ignored when the query
is run using (1). Shouldn't these two methods be equivalent? Or what
is the difference that I am missing?

Could you gist a complete curl example demonstrating the issue?

ta

clint