>  3) Once the user saves the list, I want them to be able to do further
> searches by do a "negative union" with the set of ids they already
> saved. So for example, if they already saved 1000 ids into one of  
> their
> lists, they would need to be able to get results from Solr that match
> their query but are NOT in the set of 1000 ids that they already  
> saved.
> Is this possible?
>
> Even more reason to save the queries and not the id's.  then its
>
> (query1expr) NOT (query2expr)

>But in the use case mentioned, the user is collecting specific  
>documents not necessarily all of them.

There's nothing preventing the final query from being:

(id1 OR id7 OR id6) NOT (cats OR dogs)  

Ie if a user selects a few docs you save id's and turn that into a
query, if they select 'all' you save the query itself.  You can of
course be even more clever if the select all except one result and so
on.

If you wanted to be really fancy I suppose you could parse the queries
on the front end to catch the case where you were +id7 and -id7 at the
same time and handle it accordingly.  But using queries gives you the
ability to easily do fancy Boolean logic with saved query 'results'  ie

((query1 or query2) not (query3 and query4)) and (query8)

- will


Reply via email to