: After looking over the fields in the default solr schema, I am having : trouble deciding where to put my facet id values. Seems like I should add a : field called tags, or facets, or something similar. Also, I'm adding a : description field. I guess I'm trying to verify that there is not a better : solution or field value that I should be using to keep my product : descriptions and tags/facet values? Because these two fields are probably : common, I was wondered why it wasn't in the default schema?
First off, there is no default solr schema ... just a sample schema provided with the example to give you an idea of all the different types of things that are possible in a Solr schema -- by all means you should make your own schema to fit the needs of your index. Second: there's really no need to put the information about what facets you have into documents in your index -- you certainly could do that (In my case, in addition to having one document per product, i have one "metadata document" per category which contains stored fields with structured information about what facets i want) but you could just as easily store that information externally in configuration files -- either directly in the solrconfig.xml so that it's passed to your request handlers init() method, or in a file whose name is specified in the solrconfig.xml. once you've done that you can parse the facet information and store it in memory in any datastructure you want ... based on your sample XML, I'm guessing you'd have a structure that ultimately contained a lot of records with numeric identifiers pointing at label/Query pairs. When your handler recieves a request, it can walk your datastructure looking at the IDs specified in the request to figure out which Queries to execute to filter the main result set, and which queries to execute to get a facet count ... the filterCache should make sure that all of the individual DocSets are cached (and warmed when the index changes) Your example XML file looks like upi are persuing a very generic, reusable, general purpose config format for faceted searching, along the lines of some brainstorming that was done a while back... http://www.nabble.com/metadata+about+result+sets--t1243321.html please keep the rest of us in the loop on your progress ... even if your project isn't something you would able to contribute back to Apache, any insights you have while working on generic faceted searching would be valuable to others. -Hoss