I have a requirement , where I am storing the product data to Solr , along with the product data , I would like to store the click stream signals .
In one core I have all the product data indexed . And I am planning to store click stream signal in second core or some noSql data base and then combine the each documents with the corresponding top 10 click stream data .
In my product core schema.xml, I have two dynamic fields which will store the click Stream signals in my main core.
<dynamicField name="result_id*" type="string" indexed="true" stored="true" required="false"/>
<dynamicField name="ClickStream_score*" type="double" indexed="true" stored="true" required="false"/>
and in my second core or in my noSql data base , I am planning to index search term[not_analyzed] along with the top 10 doc_id[result_id] with score ClickStream_score.
my clickStream data would look something like this -
[
{
"search_term":"iphone",
"result_id_1":"3",
"ClickStream_score_1":12,
"result_id_2":"8",
"ClickStream_score_2":234,
"result_id_3":"9",
"ClickStream_score_3":34
}
,
{
"search_term":"iphone case",
"result_id_1":"6",
"ClickStream_score_1":125,
"result_id_2":"10",
"ClickStream_score_2":20
}
]
Periodically I want to index all my ClickStream data to the solr main index . how can do that because I would have to map each id with associate search term and score.