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

Indexes on array properties #52

Open
michael opened this issue Aug 18, 2013 · 3 comments
Open

Indexes on array properties #52

michael opened this issue Aug 18, 2013 · 3 comments
Assignees

Comments

@michael
Copy link
Member

michael commented Aug 18, 2013

For Lens I'd like to access all figure_refs for a given node. So I'd have to tell the index that it should take the nodeid which corresponds to the first element from path.

  "figure_refs_by_node": {
    "type": "figure_reference",
    "properties": ["path[0]"] // no idea how to specify that
  }

Desired usage:

doc.find('figur_refs_by_node', 'paragraph_12');
@ghost ghost assigned obuchtala Aug 18, 2013
@michael
Copy link
Member Author

michael commented Aug 18, 2013

Hmm.. seems like I can use the annotator to do that.

docController.getAnnotations({
  node: "paragraph_12",
  filter: function() { return return a.type ==='figure_reference';}
});

works for me for now.. maybe we can optimize this a little bit. does the annotator use any kind of indexing?

@obuchtala
Copy link
Member

I have implemented an hierarchical index in the annotator... We could
extract and provide it via API. And maybe also activate the index via
schema... Though, I am not totally sure if it should be that way or the
application should activate the indxes it needs...
Am 18.08.2013 15:41 schrieb "Michael Aufreiter" notifications@github.com:

Hmm.. seems like I can use the annotator to do that.

docController.getAnnotations({
node: "paragraph_12",
filter: function() { return return a.type ==='figure_reference';}});

works for me for now.. maybe we can optimize this a little bit. does the
annotator use any kind of indexing?


Reply to this email directly or view it on GitHubhttps://github.com//issues/52#issuecomment-22830641
.

@michael
Copy link
Member Author

michael commented Aug 18, 2013

Good point. Not sure if indices should be specified on the schema or invoked by the application. The latter is fine for me.

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