lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Subject Re: loading many documents by ID
Date Thu, 01 Feb 2007 21:08:53 GMT
On 2/1/07, Ryan McKinley <> wrote:
> I am (was?) using DISTINCT to say, only add the unique fields.  As
> implemented, it keeps a Collection<String> for each field name.  If
> the 'mode' is 'DISTINCT' the collection is Set<String>, otherwise
> List<String>

Ah, OK... that does seem useful.

> How would you feel about an interface like this:

Not sure... depends on how update handlers will use it...
One thing we might not want to get rid of though is streaming
(constructing and adding a document, then discarding it).  People are
starting to add a lot of documents in a single XML request, and this
will be much larger for CVS/SQL.

For that reason, I'm not sure how often the "Collection" part will be utilized.

I like the it OK on the conceptual level though.


> public class IndexDocumentsCommand
> {
>   public enum MODE {
>     APPEND,    // add the fields to existing fields
>     OVERWRITE, // overwrite existing fields
>     INCREMENT, // increment existing field
>     DISTINCT   // same as APPEND, but make sure there are distinct values
>   };
>   // optional id in "internal" indexed form... if it is needed and not supplied,
>   // it will be obtained from the doc.
>   public String indexedId;
>   public Collection<SolrDocument> docs;
>   public boolean allowDups;
>   public boolean overwrite;
>   public SimpleOrderedMap<MODE> modifyFieldMode; // What to do for
> each field.  We should support *
>   public int commitMaxTime = -1; // make sure these documents are
> committed within this much time
> }

View raw message