You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by pof <Me...@gmail.com> on 2009/06/30 08:18:52 UTC

Deleting from SolrQueryResponse

Hi, I was wondering if any has had luck deleting added documents to
SolrQueryResponse? I am subclassing StandardRequestHandler and after I run
the handle request body method (super.handleRequestBody(req, rsp);) I won't
to filter out some of the hits.

Thanks. Brett
-- 
View this message in context: http://www.nabble.com/Deleting-from-SolrQueryResponse-tp24266686p24266686.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Deleting from SolrQueryResponse

Posted by pof <Me...@gmail.com>.
This thread got buried last night, so... bump.

pof wrote:
> 
> Hi, I was wondering if any has had luck deleting added documents from
> SolrQueryResponse? I am subclassing StandardRequestHandler and after I run
> the handle request body method (super.handleRequestBody(req, rsp);) I want
> to filter out some of the hits.
> 
> Thanks. Brett
> 

-- 
View this message in context: http://www.nabble.com/Deleting-from-SolrQueryResponse-tp24266686p24281972.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Deleting from SolrQueryResponse

Posted by Chris Hostetter <ho...@fucit.org>.
: Okay. So still, how would I go about creating a new DocList and Docset as
: they cannot be instantiated?

DocLists and DocSets are retrieved from the SolrIndexSearcher as results 
from searches.  a simple javadoc search for the useages of the DocList and 
DocSet APIs would have given you this answer.



-Hoss


Re: Deleting from SolrQueryResponse

Posted by pof <Me...@gmail.com>.
Okay. So still, how would I go about creating a new DocList and Docset as
they cannot be instantiated?

Thanks, Brett.

hossman wrote:
> 
> 
> : > one thing to keep in mind however is that post-processing a DocList to 
> : > filter stuff out is almost never a good idea -- things get really 
> : > convoluted when you think about dealing with pagination and except for 
> : > some really trivial use cases you can never know what your upper bound 
> : > should be when deciding how many hits to request from underlying 
> : > IndexSearcher.  You're usually better off restructuring your problem
> so 
> : > that you can construct a Query/Filter/DocSet that you want to filter
> by 
> : > first and *then* executing the search to generate the DocList in a
> single 
> : > pass.
> : > 
> : I was wanting to edit the DocList in a custom SearchComponent to be
> executed
> : after the QueryComponent. I do not require facetting etc. If do not want
> : facetted results, will I still need to take any special steps not to
> break
> : the doclist?
> 
> i didn't say anything about faceting ... i was talking about pagination 
> (ie: making sure you return the X number of rows the user asked for, and 
> making sure that when they *next* X rows you start at the right spot.
> 
> 
> 
> 
> -Hoss
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Deleting-from-SolrQueryResponse-tp24266686p24456659.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Deleting from SolrQueryResponse

Posted by Chris Hostetter <ho...@fucit.org>.
: > one thing to keep in mind however is that post-processing a DocList to 
: > filter stuff out is almost never a good idea -- things get really 
: > convoluted when you think about dealing with pagination and except for 
: > some really trivial use cases you can never know what your upper bound 
: > should be when deciding how many hits to request from underlying 
: > IndexSearcher.  You're usually better off restructuring your problem so 
: > that you can construct a Query/Filter/DocSet that you want to filter by 
: > first and *then* executing the search to generate the DocList in a single 
: > pass.
: > 
: I was wanting to edit the DocList in a custom SearchComponent to be executed
: after the QueryComponent. I do not require facetting etc. If do not want
: facetted results, will I still need to take any special steps not to break
: the doclist?

i didn't say anything about faceting ... i was talking about pagination 
(ie: making sure you return the X number of rows the user asked for, and 
making sure that when they *next* X rows you start at the right spot.




-Hoss


Re: Deleting from SolrQueryResponse

Posted by pof <Me...@gmail.com>.


hossman wrote:
> 
> one thing to keep in mind however is that post-processing a DocList to 
> filter stuff out is almost never a good idea -- things get really 
> convoluted when you think about dealing with pagination and except for 
> some really trivial use cases you can never know what your upper bound 
> should be when deciding how many hits to request from underlying 
> IndexSearcher.  You're usually better off restructuring your problem so 
> that you can construct a Query/Filter/DocSet that you want to filter by 
> first and *then* executing the search to generate the DocList in a single 
> pass.
> 
I was wanting to edit the DocList in a custom SearchComponent to be executed
after the QueryComponent. I do not require facetting etc. If do not want
facetted results, will I still need to take any special steps not to break
the doclist?

hossman wrote:
> 
> PS: replying to your own message (or reposting it) to "bump" it up 
> generally doesn't encourage replies any faster -- it just increases the 
> volume of traffic on the list, and if anything antagonizes people and 
> makes them less interested in responding.
> 
Okay, sorry I wasn't certain on the protocol on that.


Thanks, Brett.
-- 
View this message in context: http://www.nabble.com/Deleting-from-SolrQueryResponse-tp24266686p24315607.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Deleting from SolrQueryResponse

Posted by Chris Hostetter <ho...@fucit.org>.
: Hi, I was wondering if any has had luck deleting added documents to
: SolrQueryResponse? I am subclassing StandardRequestHandler and after I run
: the handle request body method (super.handleRequestBody(req, rsp);) I won't
: to filter out some of the hits.


DocLists are immutable (if i remember correctly) but your handler can 
always remove the DocList from the SolrQueryResponse and then replce it 
with a new one after you've made your changes.

one thing to keep in mind however is that post-processing a DocList to 
filter stuff out is almost never a good idea -- things get really 
convoluted when you think about dealing with pagination and except for 
some really trivial use cases you can never know what your upper bound 
should be when deciding how many hits to request from underlying 
IndexSearcher.  You're usually better off restructuring your problem so 
that you can construct a Query/Filter/DocSet that you want to filter by 
first and *then* executing the search to generate the DocList in a single 
pass.


PS: replying to your own message (or reposting it) to "bump" it up 
generally doesn't encourage replies any faster -- it just increases the 
volume of traffic on the list, and if anything antagonizes people and 
makes them less interested in responding.





-Hoss