« Back Issue #293
  • 2010-09-02 08:31 Reported by administrator
  • 2010-09-06 15:16 Marked fixed
Status: Marked fixed
Priority: Medium

Make the approach to processing queries more modular

administrator 2010-09-02 08:31

Idea break apart query handling into iterators. Already have an iterator for iterating over docs associated to a word. This iterator in 0.3 is also responsible for filtering against additional keywords. Instead we should create new iterators that take as input simpler iterators and do additional processing. Iterators that should be added are:

intersection iterator - intersects the results of more than one iterator union -iterator - takes the union of results from more than one iterator, should also results from different indexes. phrase iterator - allows for checking for information within the documents of a given iterator such as for exact phrases. Also allows scores and ranks of results to be weighted. group iterator - allows grouping of docs returned from an iterator by key part.

chris 2010-09-02 09:36

Fixed with commit 7fb47f3. Union iterator has a somewhat simplistic implementation for now, both in how the iteration is done and how parsing is done.

Namely, it would be better if the output of the iterator was more nearly ordered by score. Ordering is done in the getSummariesByHash method of PhraseModel but it relies on the fact the iterator output is close to sorted, so this could be improved.

Parsing for now is easy regular expressions rather than true parsing using a CFG.

X