Search code examples
solrlucenerdbmssolrnet

Solr / rdbms, where to store additonal data


What would be considered best practice when you need additional data about facet results.

ie. i need a friendlyname / image / meta keywords / description / and more.. for product categories. (when faceting on categories)

  • include it in the document? (can lead to looots of duplication)
  • introduce category as a new index in solr (or fake by doctype=category field in solr)
  • use a rdbms to lookup additional data using a SELECT WHERE IN (..category facet result ids..)

Thanks,

Remco


Solution

  • I would think about 2 alternatives:

    1.) strong the informations for every document without indexing it (to keep the index small as possible). The point is, that i would not store the image insight Lucene/Solr - only an file pointer.

    2.) store the additional data on an rdbms or nosql (linke mongoDB) to lookup, as you wrote.

    My favorite is the 2nd. one, because an database is the traditional and most optimized way to storing data. But finally it depends on your system, because you should keep in mind, that you need time for connecting an database, searching through the data and sending the additional information back to the application. So it could be faster to store everything on lucene.

    Probably an small performance test would be useful.