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 darul <da...@gmail.com> on 2011/10/03 15:13:24 UTC
Documents Indexed, SolrJ see nothing before long time
Hello,
While documents are indexed, I mean I can retrieve it with solr
administration console, it is taking too long, about 5 minutes before I can
see it using SolrJ API.
Do you have any Idea on how to resolve this please ?
Only specific configuration I have is :
<autoCommit>
<maxTime>30000</maxTime>
</autoCommit>
Thanks,
Jul
--
View this message in context: http://lucene.472066.n3.nabble.com/Documents-Indexed-SolrJ-see-nothing-before-long-time-tp3389721p3389721.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Documents Indexed, SolrJ see nothing before long time
Posted by darul <da...@gmail.com>.
Well, I guess, it is stupid to make +creation_date:[* TO NOW] filter....
--
View this message in context: http://lucene.472066.n3.nabble.com/Documents-Indexed-SolrJ-see-nothing-before-long-time-tp3389721p3392538.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Documents Indexed, SolrJ see nothing before long time
Posted by darul <da...@gmail.com>.
Thank you Christopher, I have found one issue in my code when building a
query, thus I do not know why it is not working.
When I comment this line, I get right result count :
// solrQuery.setParam("fq", "+creation_date:[* TO NOW] +type:QUESTION");
Where creation_date is one Date field and type one String field.
I have tried those 2 lines which also make the query retrieve wrong count
whereas with curl working...:
solrQuery.addFilterQuery("creation_date:[* TO NOW]");
solrQuery.addFilterQuery("type:QUESTION");
When I remove filter on date, it works :
solrQuery.addFilterQuery("type:QUESTION");
any problem with adding 2 filters and one with a date ?
Is there any problem with this syntax for filter query and SolrJ ?
--
View this message in context: http://lucene.472066.n3.nabble.com/Documents-Indexed-SolrJ-see-nothing-before-long-time-tp3389721p3392473.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Documents Indexed, SolrJ see nothing before long time
Posted by Christopher Gross <co...@gmail.com>.
Sorry, lack of sleep made me see an extra "0" in there.
I haven't had this issue -- but after every batch of items that I post
into Solr with SolrJ I run the commit() routine on my instance of the
CommonsHttpSolrServer, so they show up immediately. You could try
altering your code to do that, or changing the maxDocs setting to a
smaller number that would trigger more often.
I don't know of cache on SolrJ...but I know that after I insert
records I can immediately search for them in my JUnit tests.
-- Chris
On Mon, Oct 3, 2011 at 3:50 PM, darul <da...@gmail.com> wrote:
> Any SolrJ cache ? I am newbie ;)
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Documents-Indexed-SolrJ-see-nothing-before-long-time-tp3389721p3390942.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
Re: Documents Indexed, SolrJ see nothing before long time
Posted by darul <da...@gmail.com>.
Any SolrJ cache ? I am newbie ;)
--
View this message in context: http://lucene.472066.n3.nabble.com/Documents-Indexed-SolrJ-see-nothing-before-long-time-tp3389721p3390942.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Documents Indexed, SolrJ see nothing before long time
Posted by darul <da...@gmail.com>.
30000ms = 5 minutes ? Are you sure you are not mistaking...
30000ms = 30s
--
View this message in context: http://lucene.472066.n3.nabble.com/Documents-Indexed-SolrJ-see-nothing-before-long-time-tp3389721p3390515.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Documents Indexed, SolrJ see nothing before long time
Posted by Christopher Gross <co...@gmail.com>.
See:
http://wiki.apache.org/solr/SolrConfigXml
The example in the wiki is:
<autoCommit>
<maxDocs>10000</maxDocs> <!-- maximum uncommited docs before
autocommit triggered -->
<maxTime>86000</maxTime> <!-- maximum time (in MS) after adding
a doc before an autocommit is triggered -->
</autoCommit>
So since you have yours set to 30000, that translates to 30,000 ms,
which is 5 minutes. If you want the autocommit feature to trigger
more often, you could decrease the number. Dropping it to 6000 would
make it auto commit every minute, but I don't know if that is too
often for you.
-- Chris
On Mon, Oct 3, 2011 at 10:00 AM, darul <da...@gmail.com> wrote:
> Or any Idea to see cache updated more quickly, I do not understand well how
> caches are working in Solr.
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Documents-Indexed-SolrJ-see-nothing-before-long-time-tp3389721p3389864.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
Re: Documents Indexed, SolrJ see nothing before long time
Posted by darul <da...@gmail.com>.
Or any Idea to see cache updated more quickly, I do not understand well how
caches are working in Solr.
--
View this message in context: http://lucene.472066.n3.nabble.com/Documents-Indexed-SolrJ-see-nothing-before-long-time-tp3389721p3389864.html
Sent from the Solr - User mailing list archive at Nabble.com.