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 Aleksander Stensby <al...@integrasco.com> on 2009/12/18 14:05:23 UTC

Optimize not having any effect on my index

Hey guys,
I'm getting some strange behavior here, and I'm wondering if I'm doing
anything wrong..

I've got an unoptimized index, and I'm trying to run the following command:
http://server:8983/solr/update?optimize=true&maxSegments=10&waitFlush=false
Tried it first directly in the browser, it obviously took quite a bit of
time, but once it was finished I see no difference in my index. Same number
of files, same size etc.
So i tried with curl:
curl http://server:8983/solr/update --data-binary '<optimize/>' -H
'Content-type:text/xml; charset=utf-8'

No difference here either... Am I doing anything wrong? Do i need to issue a
commit after the optimize?

Any pointers would be greatly appreciated.

Cheers,
 Aleks

Re: Optimize not having any effect on my index

Posted by Aleksander Stensby <al...@integrasco.com>.
Hey, I managed to run it correctly after a few restarts. Don't really know
what happened.
Can't really see what this would have had to do with compound file format
tho? But no, I'm not using compund file format.

Cheers and thanks for your replies,
 Aleks

On Mon, Dec 21, 2009 at 8:27 AM, gurudev <su...@yahoo.com> wrote:

>
> Hi,
>
> Are you using the compound file format? If yes, then, have u set it
> properly
> in solrconfig.xml, if not, then, change to:
>
> <useCompoundFile>true</useCompoundFile> (this is by default 'false') under
> the tags:
>
> <indexDefaults>.......</indexDefaults>
>  and, <mainIndex>.......</mainIndex>
>
>
>
>
> Aleksander Stensby wrote:
> >
> > Hey guys,
> > I'm getting some strange behavior here, and I'm wondering if I'm doing
> > anything wrong..
> >
> > I've got an unoptimized index, and I'm trying to run the following
> > command:
> >
> http://server:8983/solr/update?optimize=true&maxSegments=10&waitFlush=false
> > Tried it first directly in the browser, it obviously took quite a bit of
> > time, but once it was finished I see no difference in my index. Same
> > number
> > of files, same size etc.
> > So i tried with curl:
> > curl http://server:8983/solr/update --data-binary '<optimize/>' -H
> > 'Content-type:text/xml; charset=utf-8'
> >
> > No difference here either... Am I doing anything wrong? Do i need to
> issue
> > a
> > commit after the optimize?
> >
> > Any pointers would be greatly appreciated.
> >
> > Cheers,
> >  Aleks
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Optimize-not-having-any-effect-on-my-index-tp26843094p26870653.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>

Re: Optimize not having any effect on my index

Posted by gurudev <su...@yahoo.com>.
Hi,

Are you using the compound file format? If yes, then, have u set it properly
in solrconfig.xml, if not, then, change to:

<useCompoundFile>true</useCompoundFile> (this is by default 'false') under
the tags:

<indexDefaults>.......</indexDefaults>
 and, <mainIndex>.......</mainIndex>




Aleksander Stensby wrote:
> 
> Hey guys,
> I'm getting some strange behavior here, and I'm wondering if I'm doing
> anything wrong..
> 
> I've got an unoptimized index, and I'm trying to run the following
> command:
> http://server:8983/solr/update?optimize=true&maxSegments=10&waitFlush=false
> Tried it first directly in the browser, it obviously took quite a bit of
> time, but once it was finished I see no difference in my index. Same
> number
> of files, same size etc.
> So i tried with curl:
> curl http://server:8983/solr/update --data-binary '<optimize/>' -H
> 'Content-type:text/xml; charset=utf-8'
> 
> No difference here either... Am I doing anything wrong? Do i need to issue
> a
> commit after the optimize?
> 
> Any pointers would be greatly appreciated.
> 
> Cheers,
>  Aleks
> 
> 

-- 
View this message in context: http://old.nabble.com/Optimize-not-having-any-effect-on-my-index-tp26843094p26870653.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Optimize not having any effect on my index

Posted by Sascha Szott <sz...@zib.de>.
Hi Aleksander,

Aleksander Stensby wrote:
> So i tried with curl:
> curl http://server:8983/solr/update --data-binary '<optimize/>' -H
> 'Content-type:text/xml; charset=utf-8'
>
> No difference here either... Am I doing anything wrong? Do i need to issue a
> commit after the optimize?
Did you restart the Solr server instance after the optimize operation 
was completed?

BTW: You could initiate the optimization operation by POSTing 
optimize=true directly, i.e.,

curl http://server:8983/solr/update/update --form-string optimize=true


-Sascha