korpling/ANNIS — pull request #69 by thomaskrause (2012-12-11 11:41:15+00:00)
Title: Query optimizing: transitive precedence

This branch enables us to to some optimizing on precedence queries.

Most of the time users build up chains of precedence like this:
```
tok1 & tok2 & tok3 & #1 . #2 & #2 . #3
```
If tok1 and tok3 are selective but tok2 is not the PostgreSQL query optimizer can't now that tok1 and tok2 are implicitly connected with a distance of 2. The user could add these joins by hand as in
```
tok1 & tok2 & tok3 & #1 . #2 & #2 . #3 & #1 . 2 #3
```
but this get's almost impossible on a large number of nodes. This branch automates this tasks and propagates precedence ranges to connected nodes.