kreeben / resin

Vector space index based search engine that's available as a HTTP service or as an embedded library.
MIT License
568 stars 40 forks source link

Parse query into doubly-chained linked list #46

Closed kreeben closed 6 years ago

kreeben commented 7 years ago

Regarding Resin's QL: A plus sign means "AND". A space means "OR". A minus sign means "NOT.

The QL currently doesn't allow for grouping/nesting. We need nesting to be able to rewrite this fuzzy query of two terms:

+title:religion +body:jesus~

into these three terms:

+title:religion +(body:jesus body:jesuz)

Let each term (query clause) be a node in a doubly-chained linked list, let left be down and let right be forward. The depth of a node will represent the nesting level.

kreeben commented 7 years ago

Original query:

term1 - term2

Rewritten:

term1 - term2
                 |              term3

`

kreeben commented 6 years ago

N/A as of https://github.com/kreeben/resin/commit/5f85425a0f61bbfbe2b2676d71d72f37677a0bef