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

Clarify term query/filter behavior when _type is not indexed #9782

Closed
ppf2 opened this issue Feb 20, 2015 · 1 comment
Closed

Clarify term query/filter behavior when _type is not indexed #9782

ppf2 opened this issue Feb 20, 2015 · 1 comment
Labels
>docs General docs changes

Comments

@ppf2
Copy link
Member

ppf2 commented Feb 20, 2015

From http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-type-field.html#mapping-type-field:

The _type field can also not be indexed, and all the APIs will still work except for specific queries (term queries / filters) or faceting done on the _type field.

{
    "tweet" : {
        "_type" : {"index" : "no"}
    }
}

From testing, when _type is configured to not be indexed, a query like the following will still return the documents:

{
  "query": {
   "term": {
     "_type": {
       "value": "tweet"
     }
   }
  }
}

This seems to be consistent with the other documentation page on _uid (http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-uid-field.html) where it says "The _uid field is automatically used when _type is not indexed to perform type based filtering, and does not require the _id to be indexed."

But contradictory to the description provided on the _type doc page (http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-type-field.html#mapping-type-field):
"The _type field can also not be indexed, and all the APIs will still work except for specific queries (term queries / filters) or faceting done on the _type field."

@ppf2 ppf2 added the >docs General docs changes label Feb 20, 2015
@clintongormley
Copy link
Contributor

This is no longer an issue as you can no longer configure the _type field (see #9869)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes
Projects
None yet
Development

No branches or pull requests

2 participants