On 1/20/07, Chris Hostetter <[EMAIL PROTECTED]> wrote:
what kinds of other info are you thinking of?

minimum slop, default operator, how much to expand fuzzy queries, etc.
More just leave the door open in the future rather than implementing now.

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)
+1

 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)
+1

 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.
OK, perhaps.

 4) now it's easy to subclass StandardRequestHandler as
XmlQuerySyntaxRequestHandler or SurroundSyntaxRequestHandler
just by overriding getQUeryParser.
Blech.  All the other ideas are good, and rather orthogonal to
declaring the syntax in the query itself.

Think about it... if we only had *one* base query and no others,
wouldn't it make sense to just add a single parameter called q.syntax?
That's the way I would go.  Except we have many queries all over the
place.

if somome wants to start using surround syntax to get
span queries, then yeah: maybe they should have to switch qhich
requestHandler they use.

Sounds extreme, when the workaround is pretty simple.
Check for a prefix, and call the supported query parser.  Default
parser could be configurable via query params, so you could still have
your XmlQuerySyntaxRequestHandler if you really wanted by setting the
default appropriately.

-Yonik

Reply via email to