[ 
https://issues.apache.org/jira/browse/SOLR-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan McKinley updated SOLR-272:
-------------------------------

    Attachment: SolrInputDoc.patch

This is an alternative version of SolrDocument that only creates Collections 
for mulitvalued fields... The one big difference to Yoniks suggestion above is 
that it returns a Collection<Object> for getFieldValues() even if it is a 
single valued field.  

Running the perf test for 1M docs 5 times for each implementation:

[1000000] SolrInputDocument:   9992  9827  9823  9854  9948  
[1000000] SolrInputDocument2:  9636   9719  9699  9807  9729
[1000000] DocumentBuilder:     8866   8818  8946  8812  8953

To be honest, I'm not sure the complexity of dealing with a Map<String,Object> 
(where the Object may be a collection or not) is worth the marginal speedup.  I 
suppose if the docs are all single valued it would be a more substantial 
difference.

> SolrDocument performance testing
> --------------------------------
>
>                 Key: SOLR-272
>                 URL: https://issues.apache.org/jira/browse/SOLR-272
>             Project: Solr
>          Issue Type: Test
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>         Attachments: SOLR-272-SolrDocumentPerformanceTesting.patch, 
> SOLR-272-SolrDocumentPerformanceTesting.patch, 
> SolrDocumentPerformanceTester.java, SolrDocumentPerformanceTester.java, 
> SolrInputDoc.patch, SolrInputDoc.patch
>
>
> In 1.3, we added SolrInputDocument -- a temporary class to hold document 
> information.  There is concern that this may be less then ideal 
> performance-wise.
> To settle some concerns (mine included) I want to compare a few SolrDocument 
> implementations to make sure we are not doing something crazy.
> I implemented a LuceneInputDocument subclass of SolrInputDocument that stores 
> its values directly in Lucene Document (rather then a Map<String,Collection>).
> This is a quick test comparing:
> 1. Building documents with SolrInputDocument 
> 2. Building documents with LuceneInputDocument (same interface writing 
> directly to Document)
> 3. using DocumentBuilder (solr 1.2, solr 1.1)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to