[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Is Bison the right tool for swish-e?
From: |
Bill Moseley |
Subject: |
Is Bison the right tool for swish-e? |
Date: |
Thu, 3 Jun 2004 12:58:33 -0700 |
User-agent: |
Mutt/1.5.6i |
I have no experience with bison or yacc, but I'm wondering if I should
change that. I've read a few yacc/bison tutorials, but haven't written
any code. It's all still a bit fuzzy.
I'm the maintainer of swish-e, a search engine for small collections of
files. Currently the query parser is hand-written C and is in bad need
of a rewrite. Unfortunately, I don't have a lot of free time, so I
wanted to ask here if bison would work for us before starting out.
My main concern is one irregularity in our query syntax. Swish-e indexes
things by "metaname", which really means an index is made up of a number
of fields or columns. So, searches are really limited to a given
metaname:
title=bison # limit searches to the "title" metaname
description=(foo OR bar) # similar (case of the operator is not important)
Swish-e has a default metaname where things get indexed if not specified
like above. It's called "swishdefault". So a plain query like:
foo
is the same as
swishdefault=foo
So these two queries are the same:
title=foo description=(foo OR bar) OR (baz AND woo)
title=foo AND description=(foo OR bar) OR \
(swishdefault=baz AND swishdescription=woo)
We also want to be able to use the standard + and - operators:
foo OR bar NOT baz
foo OR bar -baz # same thing
We also have phrases by using double-quotes and the boolean operators
can be turned into search words by placing them in a phrase:
foo or bar # search for docs with either word
foo "or" bar # search for docs with all three words
"foo or bar" # find the phrase of all three words
Does this all seem like something bison can do? I assume so, but I just
wanted to run it by experienced users before I start.
Thanks,
--
Bill Moseley
address@hidden
- Is Bison the right tool for swish-e?,
Bill Moseley <=