You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by esshari <rh...@gmail.com> on 2009/03/17 10:04:48 UTC
To retrieve the number of result from solrindexersearch.
Im using JSONResponseWriter.java for json o/p.In that i have removed some of
the results before writing.Hence if i requested for 6 rows ,in that 3 rows
are removed due to my condition in JSONResponseWriter.java.Hence the output
result will be only 3.If i want to pass 25 rows in addition to rows passed
in URL,In which file i have to add this 25 rows by default.
thanks in advance.
--
View this message in context: http://www.nabble.com/To-retrieve-the-number-of-result-from-solrindexersearch.-tp22554932p22554932.html
Sent from the Solr - Dev mailing list archive at Nabble.com.
Re: To retrieve the number of result from solrindexersearch.
Posted by Chris Hostetter <ho...@fucit.org>.
: Im using JSONResponseWriter.java for json o/p.In that i have removed some of
: the results before writing.Hence if i requested for 6 rows ,in that 3 rows
: are removed due to my condition in JSONResponseWriter.java.Hence the output
: result will be only 3.If i want to pass 25 rows in addition to rows passed
: in URL,In which file i have to add this 25 rows by default.
If i'm understanding your question correctly, your goal is to modify the
main result set returned, to/add remove some documents.
My suggestion would be that instead of modifying the JSONResponseWriter,
you instead write a custom SearchComponent -- you could either subclass
the QueryComponent with a new version that modifies the query in some way
before executing it to get the documents you want, or you could write a
completely new SearchComponent that inspects the DocList and replaces it
with a modified version.
the first approach is that one i would suggest if you want pagination and
sorting to work properly.
-Hoss