RebuildIndex failed through admin interface

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

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

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?

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

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.

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!

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