Drew,

This may not help you, but it's based on my own experience.

Using the Java API (I also don't use the REST API except for exploration 
and problem reporting), I just use the JSON string as the source for every 
document.

For one of my applications (more generic), I have my own generic Record 
object that stores a mapping of field name to one or more field values. I 
then use the JSON stream parser to set it, and the XContentBuilder to 
generate it. Very quick, and very generic.

For even faster processing, I include the Jackson 2.0 libraries and then 
use the Data Binding model to serialize a Java object to JSON and 
deserialize back into a Java object. This is not as generic, but it's 
application-specific and easy to adapt to enhancements or new applications. 
To measure the performance, I created a test driver that performed the 
following 4 steps:

1. Serialize a moderately complex Java object into JSON.
2. Publish the JSON string to an LMAX Disruptor ring buffer.
3. Consume the JSON string from the LMAX Disruptor ring buffer.
4. Deserialize the JSON string back into a Java object.

Steps 1-4, inclusive were performed on two threads on my i7 MacBook at 2 
million per second. So I have no worries at all about performance when 
using JSON! Therefore, I am smiling already and have never felt the need to 
SMILE more. :-)

Brian

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/b0da6e8f-acbf-4961-849c-ec7bb0d99287%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to