<types> ... <fieldType name="random" /> ... </types> <fields> ... <dynamicField name="random*" type="random" indexed="true" stored="false"/> ... </fields>
But I don't understant how to fill the random* column. My data are issues from data import using SQL query.
Must I fill the column in db-data-config.xml and in which way ?
The RandomSortField type doesn't hold any data, so you don't need to define any column in your database to go into it.
When you query your data, you'll add "sort=random_<seed>" to the query parameters, where you define some value (whatever you want) for the <seed>. If you issue the same query later with the same seed value, you should get the same results (assuming you haven't indexed new data).
Note the field type definition in the example is not complete. It should be:
<fieldType name="random" class="solr.RandomSortField />
You can of course give the field type any name you want, but would then need to modify your dynamic field rule to reference the proper field type name.