: To do so I need to store the results as a filter, with a given name, so : the user can use it later on. But I need to store this in disk, as I can : not trust on the cache or the web session. : The user should then indicate that the query that is doing now has a : filter (a previous query) and this filter should be added to the query : (this is allowed in solr, i think) but as filter_ID, to be loaded to : solve the query.
if you really want to be ableto refer to these previous searches using some sort of identifier, and have them persist for an indefinite amount of time, it's really out of Solr's hands -- if someone were to try and add a fewture like this to Solr, how would it know which queries to remember and generate names for? how long would it store each name? ... these are the kidns of questsions that your app can understand more easily ... you could concievable use Solr to store the name=>querystring mappings in little custom solr docs if you wanted, but you have to decide when to create those mappings and when to expire them. in general though, all you really need to remember is hte query string, remembering all of the results really isn't neccessary. The next time your user wants to "refine" his search -- wether it's 10 seconds latter or 10 days later -- just take the old query string and combine it with the new query string. how you combine it depends on how you want the scoring to work, use an "fq" param if the old query shouldn't affect the score, just define the super set of docs, use a BooleanQuery if you want all the clauses from both searches to impact the score. it's important to understand that trying to keep track of the actual results would be very, very, very bad (especially if you want remember them for a really long time) because when the user comes back, the index may have chagned, docs may have shifted ids, or been edited so they no longer match the criteria, or have been deleted completely. -Hoss