You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Michael Sokolov <ms...@gmail.com> on 2018/03/04 15:23:24 UTC

Re: [jira] [Comment Edited] (LUCENE-8159) Add a copy constructor in AutomatonQuery to copy directly the compiled automaton

Perhaps Robert is a fan of Object.clone()

On Feb 28, 2018 9:59 AM, "Bruno Roustant (JIRA)" <ji...@apache.org> wrote:

>
>     [ https://issues.apache.org/jira/browse/LUCENE-8159?page=
> com.atlassian.jira.plugin.system.issuetabpanels:comment-
> tabpanel&focusedCommentId=16380407#comment-16380407 ]
>
> Bruno Roustant edited comment on LUCENE-8159 at 2/28/18 2:58 PM:
> -----------------------------------------------------------------
>
> [~rcmuir] could you be a little more explicit?
>
> Without context I don't understand why a copy constructor is bad in Java
> in general.
>
> Do you mean you prefer a copy method?
>
> PrefixQuery copy(String field)
>
>
> was (Author: bruno.roustant):
> [~rcmuir] could you be a little more explicit?
>
> Without context I don't understand why a copy constructor is bad in Java
> in general.
>
> > Add a copy constructor in AutomatonQuery to copy directly the compiled
> automaton
> > ------------------------------------------------------------
> --------------------
> >
> >                 Key: LUCENE-8159
> >                 URL: https://issues.apache.org/jira/browse/LUCENE-8159
> >             Project: Lucene - Core
> >          Issue Type: Improvement
> >          Components: core/search
> >    Affects Versions: trunk
> >            Reporter: Bruno Roustant
> >            Assignee: David Smiley
> >            Priority: Major
> >         Attachments: 0001-Add-a-copy-constructor-
> in-AutomatonQuery-to-copy-dir.patch, LUCENE-8159.patch
> >
> >
> > When the query is composed of multiple AutomatonQuery with the same
> automaton and which target different fields, it is much more efficient to
> reuse the already compiled automaton by copying it directly and just
> changing the target field.
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v7.6.3#76005)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>