0

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.

NAVNEET MATHPAL
  • 170
  • 1
  • 1
  • 10
  • Is there any reason why you can't fetch the data from your secondary index when necessary? Otherwise - you could run a batch job each night/hour/etc. to update the popularity score in your main index? – MatsLindh Jan 23 '18 at 10:32
  • @MatsLindh if you see the complexity here [this solution] .. we will have to map each search id with the corresponding search term, and that would be a complex task to achieve. Then i decided [new solution that I am thinking of] that corresponding to each product I will index the top search query so it will be easy to map , so I am planning to use mongoDB to use this clickStream data and at the indexing time I will pull the data based on ID [product ID] – NAVNEET MATHPAL Jan 23 '18 at 11:55

0 Answers0