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 Sathyakumar Seshachalam <Sa...@Trimble.com> on 2015/11/11 11:34:02 UTC

Explicit commit with openSearcher=false

Hi,

I have a Search system based on Solr that relies on autoCommit configuration (with openSearcher=false). I now have a use-case that requires me to disable autoCommit and issue explicit commit commands, But as I understand an explicit commit command "always" opens a searcher. Is this correct ? Is there anyway to work-around this?  I really do not want to open searcher overtime I hard commit (I rely on autoSoftCommit for this).

Regards,
Sathya

Re: Explicit commit with openSearcher=false

Posted by Mark Miller <ma...@gmail.com>.
openSearcher is a valid param for a commit whatever the api you are using
to issue it.

- Mark

On Wed, Nov 11, 2015 at 12:32 PM Mikhail Khludnev <
mkhludnev@griddynamics.com> wrote:

> Does waitSearcher=false works like you need?
>
> On Wed, Nov 11, 2015 at 1:34 PM, Sathyakumar Seshachalam <
> Sathyakumar_Seshachalam@trimble.com> wrote:
>
> > Hi,
> >
> > I have a Search system based on Solr that relies on autoCommit
> > configuration (with openSearcher=false). I now have a use-case that
> > requires me to disable autoCommit and issue explicit commit commands, But
> > as I understand an explicit commit command "always" opens a searcher. Is
> > this correct ? Is there anyway to work-around this?  I really do not want
> > to open searcher overtime I hard commit (I rely on autoSoftCommit for
> this).
> >
> > Regards,
> > Sathya
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
> Principal Engineer,
> Grid Dynamics
>
> <http://www.griddynamics.com>
> <mk...@griddynamics.com>
>
-- 
- Mark
about.me/markrmiller

Re: Explicit commit with openSearcher=false

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
Does waitSearcher=false works like you need?

On Wed, Nov 11, 2015 at 1:34 PM, Sathyakumar Seshachalam <
Sathyakumar_Seshachalam@trimble.com> wrote:

> Hi,
>
> I have a Search system based on Solr that relies on autoCommit
> configuration (with openSearcher=false). I now have a use-case that
> requires me to disable autoCommit and issue explicit commit commands, But
> as I understand an explicit commit command "always" opens a searcher. Is
> this correct ? Is there anyway to work-around this?  I really do not want
> to open searcher overtime I hard commit (I rely on autoSoftCommit for this).
>
> Regards,
> Sathya
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
<mk...@griddynamics.com>

Re: Explicit commit with openSearcher=false

Posted by Upayavira <uv...@odoko.co.uk>.

On Wed, Nov 11, 2015, at 06:28 PM, Chris Hostetter wrote:
> 
> : I saw mention of openSearcher for SolrJ, so I looked in the source of
> : the UpdateRequestHandler, and there is no mention of openSearcher in
> : there that I can see, for XML, JSON or SolrJ requests.
> : 
> : So my take is that this isn't possible right now :-(
> 
> It's handled by the Loaders - all of which (i think?) delegate to 
> RequestHandlerUtils.handleCommit to generate the CommitUpdateCommand 
> according to the relevant UpdateParams.

Ahh, phew. Clearly I was one level away from finding it.

> Most of the constants you see in UpdateRequestHandler look like dead code 
> that should be removed.

Fair enough.

Upayavira

Re: Explicit commit with openSearcher=false

Posted by Mark Miller <ma...@gmail.com>.
You can pass arbitrary params with Solrj. The API usage is just a little
more arcane.

- Mark

On Wed, Nov 11, 2015 at 11:33 PM Sathyakumar Seshachalam <
Sathyakumar_Seshachalam@trimble.com> wrote:

> I intend to use SolrJ. I only saw the below overloaded commit method in
> documentation (http://lucene.apache.org/solr/4_10_3/solr-solrj/index.html)
> of class ³org.apache.solr.client.solrj.SolrServer"
>
> public UpdateResponse commit(boolean waitFlush, boolean waitSearcher,
> boolean softCommit).
>
>
> And I assumed waitSearcher is not the same as openSearcher.  (From the
> documentation atleast it would seem that waitSearcher when false only does
> not block the call, but a searcher is still opened).
> None of the add methods take a openSearcher param either.
>
> Regards
> Sathya
>
>
> On 11/11/15, 11:58 PM, "Chris Hostetter" <ho...@fucit.org> wrote:
>
> >
> >: I saw mention of openSearcher for SolrJ, so I looked in the source of
> >: the UpdateRequestHandler, and there is no mention of openSearcher in
> >: there that I can see, for XML, JSON or SolrJ requests.
> >:
> >: So my take is that this isn't possible right now :-(
> >
> >It's handled by the Loaders - all of which (i think?) delegate to
> >RequestHandlerUtils.handleCommit to generate the CommitUpdateCommand
> >according to the relevant UpdateParams.
> >
> >Most of the constants you see in UpdateRequestHandler look like dead code
> >that should be removed.
> >
> >
> >-Hoss
> >http://www.lucidworks.com/
>
> --
- Mark
about.me/markrmiller

Re: Explicit commit with openSearcher=false

Posted by Sathyakumar Seshachalam <Sa...@Trimble.com>.
I intend to use SolrJ. I only saw the below overloaded commit method in
documentation (http://lucene.apache.org/solr/4_10_3/solr-solrj/index.html)
of class ³org.apache.solr.client.solrj.SolrServer"

public UpdateResponse commit(boolean waitFlush, boolean waitSearcher,
boolean softCommit).


And I assumed waitSearcher is not the same as openSearcher.  (From the
documentation atleast it would seem that waitSearcher when false only does
not block the call, but a searcher is still opened).
None of the add methods take a openSearcher param either.

Regards
Sathya


On 11/11/15, 11:58 PM, "Chris Hostetter" <ho...@fucit.org> wrote:

>
>: I saw mention of openSearcher for SolrJ, so I looked in the source of
>: the UpdateRequestHandler, and there is no mention of openSearcher in
>: there that I can see, for XML, JSON or SolrJ requests.
>: 
>: So my take is that this isn't possible right now :-(
>
>It's handled by the Loaders - all of which (i think?) delegate to
>RequestHandlerUtils.handleCommit to generate the CommitUpdateCommand
>according to the relevant UpdateParams.
>
>Most of the constants you see in UpdateRequestHandler look like dead code
>that should be removed.
>
>
>-Hoss
>http://www.lucidworks.com/


Re: Explicit commit with openSearcher=false

Posted by Chris Hostetter <ho...@fucit.org>.
: I saw mention of openSearcher for SolrJ, so I looked in the source of
: the UpdateRequestHandler, and there is no mention of openSearcher in
: there that I can see, for XML, JSON or SolrJ requests.
: 
: So my take is that this isn't possible right now :-(

It's handled by the Loaders - all of which (i think?) delegate to 
RequestHandlerUtils.handleCommit to generate the CommitUpdateCommand 
according to the relevant UpdateParams.

Most of the constants you see in UpdateRequestHandler look like dead code 
that should be removed.


-Hoss
http://www.lucidworks.com/

Re: Explicit commit with openSearcher=false

Posted by Upayavira <uv...@odoko.co.uk>.
Erick,

I saw mention of openSearcher for SolrJ, so I looked in the source of
the UpdateRequestHandler, and there is no mention of openSearcher in
there that I can see, for XML, JSON or SolrJ requests.

So my take is that this isn't possible right now :-(

Upayavira

On Wed, Nov 11, 2015, at 02:53 PM, Erick Erickson wrote:
> How are you intending to issue your commit? SolrJ has all the variants
> (openSercher, soft/hard commit, etc) for the commit calls.
> 
> Best,
> Erick
> 
> On Wed, Nov 11, 2015 at 2:35 AM, Sathyakumar Seshachalam
> <Sa...@trimble.com> wrote:
> > And I am using version 4.10.3
> >
> > On 11/11/15, 4:04 PM, "Sathyakumar Seshachalam"
> > <Sa...@Trimble.com> wrote:
> >
> >>Hi,
> >>
> >>I have a Search system based on Solr that relies on autoCommit
> >>configuration (with openSearcher=false). I now have a use-case that
> >>requires me to disable autoCommit and issue explicit commit commands, But
> >>as I understand an explicit commit command "always" opens a searcher. Is
> >>this correct ? Is there anyway to work-around this?  I really do not want
> >>to open searcher overtime I hard commit (I rely on autoSoftCommit for
> >>this).
> >>
> >>Regards,
> >>Sathya
> >

Re: Explicit commit with openSearcher=false

Posted by Erick Erickson <er...@gmail.com>.
How are you intending to issue your commit? SolrJ has all the variants
(openSercher, soft/hard commit, etc) for the commit calls.

Best,
Erick

On Wed, Nov 11, 2015 at 2:35 AM, Sathyakumar Seshachalam
<Sa...@trimble.com> wrote:
> And I am using version 4.10.3
>
> On 11/11/15, 4:04 PM, "Sathyakumar Seshachalam"
> <Sa...@Trimble.com> wrote:
>
>>Hi,
>>
>>I have a Search system based on Solr that relies on autoCommit
>>configuration (with openSearcher=false). I now have a use-case that
>>requires me to disable autoCommit and issue explicit commit commands, But
>>as I understand an explicit commit command "always" opens a searcher. Is
>>this correct ? Is there anyway to work-around this?  I really do not want
>>to open searcher overtime I hard commit (I rely on autoSoftCommit for
>>this).
>>
>>Regards,
>>Sathya
>

Re: Explicit commit with openSearcher=false

Posted by Sathyakumar Seshachalam <Sa...@Trimble.com>.
And I am using version 4.10.3

On 11/11/15, 4:04 PM, "Sathyakumar Seshachalam"
<Sa...@Trimble.com> wrote:

>Hi,
>
>I have a Search system based on Solr that relies on autoCommit
>configuration (with openSearcher=false). I now have a use-case that
>requires me to disable autoCommit and issue explicit commit commands, But
>as I understand an explicit commit command "always" opens a searcher. Is
>this correct ? Is there anyway to work-around this?  I really do not want
>to open searcher overtime I hard commit (I rely on autoSoftCommit for
>this).
>
>Regards,
>Sathya