On 2/6/07, Michael Kimsal <[EMAIL PROTECTED]> wrote:

When you say rewrite the query, what specifically do you mean?  I'm googling
(direct and on the solr site)
for query.rewrite, but nothing is jumping out at me as anything that's
useful/pertinent.  It sounds like
you're telling me to do some manipulation on the query first, but I'm
currently
just passing queries as part of the GET string in an HTTP request (this was
my main
attraction to SOLR in the first place)  Is there a way to trigger the
'rewrite' functionality via
another GET parameter?

Not currently.  However, you could try applying the following patch (untested):

Index: solr/request/StandardRequestHandler.java
===================================================================
--- solr/request/StandardRequestHandler.java    (revision 503874)
+++ solr/request/StandardRequestHandler.java    (working copy)
@@ -138,9 +138,9 @@
        SolrException.logOnce(SolrCore.log, "Exception during debug", e);
        rsp.add("exception_during_debug", SolrException.toStr(e));
      }
-
+
      NamedList sumData = HighlightingUtils.doHighlighting(
-        results.docList, query, req, new String[]{defaultField});
+        results.docList,
query.rewrite(req.getSearcher().getReader()), req, new
String[]{defaultField});
      if(sumData != null)
        rsp.add("highlighting", sumData);
  }

-Mike

Reply via email to