# RebuildIndex failed through admin interface

**URL:** https://discuss.dgraph.io/t/rebuildindex-failed-through-admin-interface/1347
**Category:** Users
**Created:** [March 15, 2017, 6:31am UTC](https://discuss.dgraph.io/t/rebuildindex-failed-through-admin-interface/1347 "2017-03-15T06:31:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Rader](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/rader/32/1061_2.png) [@Rader](https://discuss.dgraph.io/u/Rader)
#### Post date: [March 15, 2017, 6:31am UTC](https://discuss.dgraph.io/t/rebuildindex-failed-through-admin-interface/1347/1 "2017-03-15T06:31:03Z")

</div>

I try to build index for field “name” through the admin interface:

> [http://localhost:8080/admin/index?attr=name](http://localhost:8080/admin/index?attr=name)

and get this error,

> {“code”:“Attribute name is indexed”,“message”:“RebuildIndex failed.”}

Actually “name” is not indexed, as if I do query

```auto
query{
  it(func:allofterms(name,"bob"))
  {
    name
    boss_of{
      name
    }
    friend{
      name
    }
  }
}

```

Dgraph will report the filed `name` is not indexed. What could be the problem?

---

<div class="post-metadata">

### Author: ![ashwin95r](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/ashwin95r/32/16_2.png) [@ashwin95r](https://discuss.dgraph.io/u/ashwin95r)
#### Post date: [March 15, 2017, 6:39am UTC](https://discuss.dgraph.io/t/rebuildindex-failed-through-admin-interface/1347/2 "2017-03-15T06:39:10Z")

</div>

Maybe your schema file does not have `name:string @index` field. Can you please share the schema file? @Rader

---

<div class="post-metadata">

### Author: ![Rader](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/rader/32/1061_2.png) [@Rader](https://discuss.dgraph.io/u/Rader)
#### Post date: [March 15, 2017, 6:46am UTC](https://discuss.dgraph.io/t/rebuildindex-failed-through-admin-interface/1347/3 "2017-03-15T06:46:33Z")

</div>

I don’t load a schema. So I think maybe I can build the index through admin UI. Currently, it looks like the `/admin/index` is not built for creating index. Right? **But why not create one, if it’s not exist? I think its ok to build index dynamically.**

The original purpose of my post is that, maybe the error msg is not accurate. I mean it saids “Attribute name is indexed”, but wrong.

---

<div class="post-metadata">

### Author: ![ashwin95r](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/ashwin95r/32/16_2.png) [@ashwin95r](https://discuss.dgraph.io/u/ashwin95r)
#### Post date: [March 15, 2017, 6:49am UTC](https://discuss.dgraph.io/t/rebuildindex-failed-through-admin-interface/1347/4 "2017-03-15T06:49:16Z")

</div>

Yeah right, the error message needs to be fixed. The `not` is missing.

We’re working on dynamic indexing, and it’d be out with next release. As of now, this is only for **rebuilding**.

Thanks for the catch!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex007/uploads/dgraph/original/2X/2/2b38fdece2abe5814f2e51bee69d1e67fc304b0a.png) [@system](https://discuss.dgraph.io/u/system)
#### Post date: [April 14, 2017, 6:49am UTC](https://discuss.dgraph.io/t/rebuildindex-failed-through-admin-interface/1347/5 "2017-04-14T06:49:24Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
