lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Using HTTP-Post for Queries
Date Sun, 21 Jan 2007 03:11:37 GMT

: Some syntaxes might come by default from solrcondig.xml, and some
: might come from the request.
: Also, if you just needed one span query, you wouldn't want to force
: all other queries to be in the same syntax.  Think about having to
: change your faceting code that uses QueryParser queries because you
: suddenly discovered you needed something that supported a span query
: as the base query.

Ugh ... dude ... i feel dirty just reading that sentence.

: *But*, if we wanted to make it extensible (by allowing the inclusion
: of other info about the query), then we would want to strip it off
: before passing to the right query parser, so you are right.

what kinds of other info are you thinking of?

untill you brought all this up, i'd been assumign in the back of my
mind that a smart thing to do if/when i had time was:

 1) refactor StandardRequestHandler/DisMaxRequestHandler to have a common
base class (Bertrand opened an issue on this, and i think it's in Ryan's
SOLR-112 patch as a side effect)
 2) do the magic code moving/splicing/inheriting thta would allow
StandardRequestHandler to have a "sort" param like DisMax .. and only do
the ";" q split logic if there isn't one .. probably a
"getSort(SolrParams) method in the base class, inherited by dismax,
overriden in standard with a call to super, and if null then split q)
 3) add a getQueryParser(SolrParams) method to the base class, which
returned a SolrQueryParser with q.op set and things like that .. dismax
would use this for it's fq and q, standard would use this for everything.
 4) now it's easy to subclass StandardRequestHandler as
XmlQuerySyntaxRequestHandler or SurroundSyntaxRequestHandler
just by overriding getQUeryParser.

..when you started talking about this i thought "yonik's approach is a
much better idea" but given some of the issues you've pointed out about
dealing with multiple query parsers in a single handler, i'm going back to
my orriginal idea: if somome wants to start using surround syntax to get
span queries, then yeah: maybe they should have to switch qhich
requestHandler they use.




-Hoss


Mime
View raw message