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

Index not being created? #77

Closed
trentcioran opened this issue Aug 8, 2012 · 2 comments
Closed

Index not being created? #77

trentcioran opened this issue Aug 8, 2012 · 2 comments

Comments

@trentcioran
Copy link

I have a custom mapping and I'm trying to force deletion and recreation of the index, I have the following code (using the latest NEST from NuGet)

TypeMapping mapping = new ActivityLogIndexMap().Map();
client.DeleteMapping();
client.Map(mapping);
client.Refresh();

Unfortunately this does not create the mapping in Elastic Search :-/

@Mpdreamz
Copy link
Member

Mpdreamz commented Aug 9, 2012

Hi,

If memory serves me right i think i remember observing the map call no longer automatically creates the index on Elasticsearch's side like it does when you first post a document. I don't know exactly which version changed this behavior.

I just put a if (!indexexists) { createindex() } in between.

If i issue the tweet mapping call from the Elasticsearch docs

http://www.elasticsearch.org/guide/reference/api/admin-indices-put-mapping.html

On an index that doesnt exist yet i get a 404:

{"error":"IndexMissingException[[twitter] missing]","status":404}

@Mpdreamz Mpdreamz closed this as completed Aug 9, 2012
@Mpdreamz
Copy link
Member

Mpdreamz commented Aug 9, 2012

Asked on elasticsearch issues

elastic/elasticsearch#2152

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

No branches or pull requests

2 participants