The system ensures that the records about to be inserted are unique in the
table (based on a composite key).
The two data fields to be checked are UserID and ContentTitle. Instead of
checking if both exist, a hash can be created and stored in a single field.
When a record is to be added, the hashed valued of the incoming records can
be checked against the existing table's hash values.
How would this be accomplished in elasticsearch using the .Net API?
If you want to create a hash, use that hash as ID, when indexing your
data. The tuple of id and type are unique in an index. So if you reindex a
document with that hash, the data gets simple overwritten. Just make sure,
you have a good hash function in order to not overwrite data. You could
also configure the mapping of the index, to use the content of the hash
field to be used as ID. See Elasticsearch Platform — Find real-time answers at scale | Elastic
Instead of creating a hash, it might be sufficient to simply concatenate
userId and contentTitle into a single ID (123_456 for example), and use
this ID when indexing. This would save a couple of CPU cycles as you dont
need to hash, but it might not be unique, depending on the format of these
ids.
Sorry, cannot tell you anything about the .NET API, but this should give
you a first hint I hope.
The system ensures that the records about to be inserted are unique in the
table (based on a composite key).
The two data fields to be checked are UserID and ContentTitle. Instead of
checking if both exist, a hash can be created and stored in a single field.
When a record is to be added, the hashed valued of the incoming records can
be checked against the existing table's hash values.
How would this be accomplished in elasticsearch using the .Net API?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.