Solr mapping for the TimeUUID Cassandra field

What is the best display for the Cassandra TimeUUID field in Solr. I am using DSE version 3.2.4

+3
source share
5 answers

If you have any upgrade plans, it DSE4.5has a solr that allows you to set uuid and timeuuid as "uuid". http://www.datastax.com/documentation/datastax_enterprise/4.5/datastax_enterprise/srch/srchSolrType.html

+3
source

Starting with version 3.2.6 of the DSE, the CQL type timeuuidmaps to the Solr type UUIDField.

See: http://www.datastax.com/documentation/datastax_enterprise/3.2/datastax_enterprise/srch/srchSolrType.html

+1

TimeUUID - UUID, . Solr .

  • TimeUUID (, ).
  • ( date) .

, TimeUUID , .

0

, timeUUID solr. TimeUUID - .

:

: UUID: 118ffe80-466b-11e1-b5a5-5732cf729524 (, 24 2012 . 9:09:06 GMT). -24,2012 UUID.

In Solr, dataconfig.xml, you can write javascript to hide the uuid time until the actual date and create an index for this field.

Example: Get time information from the code below.

<dataConfig>

    < script> < ![CDATA[
            function f1(row)        {
               var uuid= row.get('timeUUID');
               //Java Script to convert UUID to Date
                 row.put('timeUUID', uuid);
                return row;
            }
    ]] > < /script>
    < document>
            < entity name="e"  transformer="script:f1" query="select * from X">
            ....
            < /entity>
    < /document>

Tips: You can create any additional fields using a script. Example: Year, Day, Month, etc.

0
source

All Articles