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 Tushar_Gandhi <tu...@neovasolutions.com> on 2009/01/12 13:00:56 UTC

To get all indexed records.

Hi,
   I am using solr 1.3. I want to retrieve all records from index file.
How should I write solr query so that I will get all records?

Thanks,
Tushar.
-- 
View this message in context: http://www.nabble.com/To-get-all-indexed-records.-tp21413170p21413170.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: To get all indexed records.

Posted by Akshay <ak...@gmail.com>.
Use *:* as a query to get all records. Refer to
http://wiki.apache.org/solr/SolrQuerySyntax for more info.

On Mon, Jan 12, 2009 at 5:30 PM, Tushar_Gandhi <
tushar_gandhi@neovasolutions.com> wrote:

>
> Hi,
>   I am using solr 1.3. I want to retrieve all records from index file.
> How should I write solr query so that I will get all records?
>
> Thanks,
> Tushar.
> --
> View this message in context:
> http://www.nabble.com/To-get-all-indexed-records.-tp21413170p21413170.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>


-- 
Regards,
Akshay Ukey.

Re: To get all indexed records.

Posted by Manupriya <ma...@gmail.com>.
Hi Tushar,

1. If you are using SOLR admin console to search record, then default query
'*:*' in the Query String search box will serve the purpose.

2. If you directly want to send an HTTP request for retrieving records then
you can hit a URL similar to following - 
http://localhost:8983/solr/select/?q=*%3A*&version=2.2&start=0&rows=10&indent=on

Note - Here, 'start' and 'rows' in the URL specify the first record returned
and total number of records returned respectively.

3. If you are using Solrj for querying from Java, following code snippet
would be helpful - 

CommonsHttpSolrServer server = new
CommonsHttpSolrServer("http://localhost:8983/solr");
SolrQuery query = new SolrQuery("*:*");
QueryResponse results = server.query(query);
SolrDocumentList list = results.getResults();
    
Thanks,
Manu

Tushar_Gandhi wrote:
> 
> Hi,
>    I am using solr 1.3. I want to retrieve all records from index file.
> How should I write solr query so that I will get all records?
> 
> Thanks,
> Tushar.
> 

-- 
View this message in context: http://www.nabble.com/To-get-all-indexed-records.-tp21413170p21414148.html
Sent from the Solr - User mailing list archive at Nabble.com.