Chris Harris wrote:
I was just looking at Mark Miller's Qsol parser for Lucene (
http://www.myhardshadow.com/qsol.php), and my users would really like to
have a similar ability to combine proximity and boolean search in arbitrary,
nested ways. The simplest use case I'm interested in is "phrase proximity",
where you say something like, "find me the docs where 'red hat' occurs
within ten words of 'microsoft windows'". Qsol lets you do more complicated
queries than that, though.
Right - surround and xmlqueryparser don't let you mix boolean and prox - they allow you to express span queries. Not sure about xmlqueryparser, but I think surround supports spans fully - Qsol does not, but it does allow the mixing. The cost of fully supporting spans is a somewhat rough syntax imo. Qsol does something more similar to what verity or autonomy did/does (can't remember which when). All of them would do the simplest case you mention though.
I'm thinking that maybe the most straightforward way to bring these
abilities to Solr would be to create a QParserPlugin that used Qsol itself
for the query parsing. Is this plausible? Has anyone actually done it
already? (If not Qsol, has anyone done one for surround, or xmlqueryparser,
or created a custom plugin that at least exposes some SpanQuery-based
functionality?) I'm looking at LuceneQParserPlugin/SolrQueryParser, and
they're not zero-thought wrappers around Lucene's QueryParser class, but
they're not that complicated either. Any intuition whether Qsol would be a
similar level of difficulty?

I have thought about working qsol up for solr, but there didn't seem to be enough interest to be worth it. Qsol is mainly used for niche purposes (scientific stuff or proper precedence stuff, or mimicking a legacy query language). As a general parser, its a pretty fat kitchen sink. It should be easy enough to plug any of these parsers in though - in the end they just take a string and output a Query object just like the standard Lucene query parser.

- Mark

Reply via email to