You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Ryan McKinley <ry...@gmail.com> on 2010/12/28 23:25:51 UTC

Solr pseudo fields in response

With Yonik's work on SOLR-2297, I figured i would dive back into
figuing out how we could do this....  I updated SOLR-1566 to compile
with trunk, but when i looked into really making it work, there are
some issues.

It looks like the APIs now support extra fields *BUT* they don't do
anything, and there is no clear way how to best make them work.  For
example
  TextResponseWriter.writeSolrDocument() includes a parameter Map pseudoFields
and
  TextResponseWriter.writeSolrDocumentList() includes Map otherFields

Any idea how this is supposed to work?

I see a few problems with this approach:
* this requires each format (XML/JSON/binary/etc) to do its own implementing
* only supports SolrDocument, not Document

BaseResponseWriter may be a reasonable approach -- it abstracts the
Document creation into one place.  It may have performance issues
since every document would get turned into a SolrDocument before
getting written.  This only applies to the docs that are written so it
may not be a big deal.

BUT BaseResponseWriter does not have any concrete implementation and
converting the XML/TextResponseWriter to use it is not clear to me.

Thoughts?

ryan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org