lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Solr + Complex Legacy Schema -- Best Practices?
Date Wed, 09 Apr 2008 06:00:33 GMT

: I just was wondering, has anybody dealt with trying to "translate" the 
: data from a big, legacy DB schema to a Solr installation?  What I mean 

there's really no general answer to that question -- it all comes down to 
what you want to query on, and what kinds of results you want to get 
out... if you want your queries to result in lists of "products" then you 
should have one Document per product -- if you want to be able to query on 
the text of user reviews then you need to flatten all the user reviews for 
each product into the Document for each product.  Sometimes you'll want 
two types of Documents ... one Document per product, containing all the 
text of all the user reviews, and one Document per user review, with the 
Product information duplicated in each so you can search for...

  q=reviewtext:solr&fq=doctype:product&fq=productype:camera

...to get a list of all the products that are cameras that contain the 
word solr in the text of *a* review, or you can search for...

  q=reviewtext:solr&fq=doctype:review&fq=producttype:camera

...to get a list of all the reviews that contain the word solr, and 
are about products that are cameras.  

Your use cases and goals will be differnet then everyone elses.


-Hoss


Mime
View raw message