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 Delip Rao <de...@ravellaw.com> on 2013/08/12 22:58:22 UTC

Using EmbeddedSolrServer in Solr 4.4.0

Hello,

I'm trying to teach myself how to use EmbeddedSolrServer for indexing and
querying. I wrote a simple program -- Index a bunch of documents and query
all documents. I'm using Solr 4.4.0 jars and I can't see any output from
the query, i.e. I get 0 hits.

13/08/12 12:41:17 INFO core.SolrCore: [shakespeare] webapp=null
path=/select params={*:*=} hits=0 status=0 QTime=21

The code I wrote for this is here:
https://gist.github.com/delip/6214406

My schema.xml is here:
https://gist.github.com/delip/6214442

And the logs from running the code is here:
https://gist.github.com/delip/6214466

Any idea what I am doing wrong?

Thanks,
Delip
twitter.com/deliprao

Re: Using EmbeddedSolrServer in Solr 4.4.0

Posted by Delip Rao <de...@ravellaw.com>.
Yes, my config xmls were correct and the first thing I did before posting
here was to check with the Solr sever. That worked. I just solved this
right now. Turns out my problem was in the following line:

    SolrParams solrParams = SolrRequestParsers.parseQueryString("*:*");

That was not doing it right and I used ModifiableSolrParams to create one
myself. That did the trick. Thanks!


On Mon, Aug 12, 2013 at 2:04 PM, Jack Krupansky <ja...@basetechnology.com>wrote:

> Are you able to use the regular Solr server to do comparable tasks?
>
> Best to learn Solr using the standard setup and tutorial and then
> reproduce problems there first, before getting too deep into "embedded".
>
> -- Jack Krupansky
>
> -----Original Message----- From: Delip Rao
> Sent: Monday, August 12, 2013 4:58 PM
> To: solr-user@lucene.apache.org
> Subject: Using EmbeddedSolrServer in Solr 4.4.0
>
>
> Hello,
>
> I'm trying to teach myself how to use EmbeddedSolrServer for indexing and
> querying. I wrote a simple program -- Index a bunch of documents and query
> all documents. I'm using Solr 4.4.0 jars and I can't see any output from
> the query, i.e. I get 0 hits.
>
> 13/08/12 12:41:17 INFO core.SolrCore: [shakespeare] webapp=null
> path=/select params={*:*=} hits=0 status=0 QTime=21
>
> The code I wrote for this is here:
> https://gist.github.com/delip/**6214406<https://gist.github.com/delip/6214406>
>
> My schema.xml is here:
> https://gist.github.com/delip/**6214442<https://gist.github.com/delip/6214442>
>
> And the logs from running the code is here:
> https://gist.github.com/delip/**6214466<https://gist.github.com/delip/6214466>
>
> Any idea what I am doing wrong?
>
> Thanks,
> Delip
> twitter.com/deliprao
>



-- 
- Delip
twitter.com/deliprao

Join the Ravelution!

Re: Using EmbeddedSolrServer in Solr 4.4.0

Posted by Jack Krupansky <ja...@basetechnology.com>.
Are you able to use the regular Solr server to do comparable tasks?

Best to learn Solr using the standard setup and tutorial and then reproduce 
problems there first, before getting too deep into "embedded".

-- Jack Krupansky

-----Original Message----- 
From: Delip Rao
Sent: Monday, August 12, 2013 4:58 PM
To: solr-user@lucene.apache.org
Subject: Using EmbeddedSolrServer in Solr 4.4.0

Hello,

I'm trying to teach myself how to use EmbeddedSolrServer for indexing and
querying. I wrote a simple program -- Index a bunch of documents and query
all documents. I'm using Solr 4.4.0 jars and I can't see any output from
the query, i.e. I get 0 hits.

13/08/12 12:41:17 INFO core.SolrCore: [shakespeare] webapp=null
path=/select params={*:*=} hits=0 status=0 QTime=21

The code I wrote for this is here:
https://gist.github.com/delip/6214406

My schema.xml is here:
https://gist.github.com/delip/6214442

And the logs from running the code is here:
https://gist.github.com/delip/6214466

Any idea what I am doing wrong?

Thanks,
Delip
twitter.com/deliprao