You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Victor Hadianto <vi...@nuix.com.au> on 2003/06/10 02:35:42 UTC

Duplicating a document in the index.

Hi list,

Is there an easy way for duplicating a document in the index? Or can someone 
point me to the right direction for looking?

Thanks,
-- 
Victor Hadianto

NUIX Pty Ltd
Level 8, 143 York Street, Sydney 2000
Phone: (02) 9283 9010
Fax:   (02) 9283 9020

This message is intended only for the named recipient. If you are not the
intended recipient you are notified that disclosing, copying, distributing
or taking any action in reliance on the contents of this message or
attachment is strictly prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: Duplicating a document in the index.

Posted by Victor Hadianto <vi...@nuix.com.au>.
Interesting, I've never thought that it may work. I always thought you have to 
create a new document with all the fields again.

Will give it a try.

Thanks,

victor

On Tue, 10 Jun 2003 11:41 pm, Otis Gospodnetic wrote:
> Pseudo-pseudocode:
>
> TermQuery q = ....
> Hits hits = searcher.search(q);
> Document doc = hits(1);
> writer.add(doc); // now you have who docs in the index
> writer.close();
>
> No?
> Have you tried this and it didn't work?
>
> Otis
>
> --- Victor Hadianto <vi...@nuix.com.au> wrote:
> > On Tue, 10 Jun 2003 05:03 pm, Otis Gospodnetic wrote:
> > > You could add it twice.
> > > You could probably also get it out of the index (e.g. via search),
> >
> > and
> >
> > > re-add it.
> > > You can have multiple instances of the same document in the index.
> >
> > Hmm what if the fields data is not available anymore? Is there a way
> > to
> > dulicate fields in the index?
> >
> > > Otis
> >
> > victor
> >
> > > --- Victor Hadianto <vi...@nuix.com.au> wrote:
> > > > Hi list,
> > > >
> > > > Is there an easy way for duplicating a document in the index? Or
> >
> > can
> >
> > > > someone
> > > > point me to the right direction for looking?
> > > >
> > > > Thanks,
> > > > --
> > > > Victor Hadianto
> > > >
> > > > NUIX Pty Ltd
> > > > Level 8, 143 York Street, Sydney 2000
> > > > Phone: (02) 9283 9010
> > > > Fax:   (02) 9283 9020
> > > >
> > > > This message is intended only for the named recipient. If you are
> >
> > not
> >
> > > > the
> > > > intended recipient you are notified that disclosing, copying,
> > > > distributing
> > > > or taking any action in reliance on the contents of this message
> >
> > or
> >
> > > > attachment is strictly prohibited.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
> http://calendar.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org

-- 
Victor Hadianto

NUIX Pty Ltd
Level 8, 143 York Street, Sydney 2000
Phone: (02) 9283 9010
Fax:   (02) 9283 9020

This message is intended only for the named recipient. If you are not the
intended recipient you are notified that disclosing, copying, distributing
or taking any action in reliance on the contents of this message or
attachment is strictly prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: Duplicating a document in the index.

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Pseudo-pseudocode:

TermQuery q = ....
Hits hits = searcher.search(q);
Document doc = hits(1);
writer.add(doc); // now you have who docs in the index
writer.close();

No?
Have you tried this and it didn't work?

Otis


--- Victor Hadianto <vi...@nuix.com.au> wrote:
> On Tue, 10 Jun 2003 05:03 pm, Otis Gospodnetic wrote:
> > You could add it twice.
> > You could probably also get it out of the index (e.g. via search),
> and
> > re-add it.
> > You can have multiple instances of the same document in the index.
> 
> Hmm what if the fields data is not available anymore? Is there a way
> to 
> dulicate fields in the index?
> 
> 
> > Otis
> victor
> 
> >
> > --- Victor Hadianto <vi...@nuix.com.au> wrote:
> > > Hi list,
> > >
> > > Is there an easy way for duplicating a document in the index? Or
> can
> > > someone
> > > point me to the right direction for looking?
> > >
> > > Thanks,
> > > --
> > > Victor Hadianto
> > >
> > > NUIX Pty Ltd
> > > Level 8, 143 York Street, Sydney 2000
> > > Phone: (02) 9283 9010
> > > Fax:   (02) 9283 9020
> > >
> > > This message is intended only for the named recipient. If you are
> not
> > > the
> > > intended recipient you are notified that disclosing, copying,
> > > distributing
> > > or taking any action in reliance on the contents of this message
> or
> > > attachment is strictly prohibited.
> > >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: Duplicating a document in the index.

Posted by Victor Hadianto <vi...@nuix.com.au>.
On Tue, 10 Jun 2003 05:03 pm, Otis Gospodnetic wrote:
> You could add it twice.
> You could probably also get it out of the index (e.g. via search), and
> re-add it.
> You can have multiple instances of the same document in the index.

Hmm what if the fields data is not available anymore? Is there a way to 
dulicate fields in the index?


> Otis
victor

>
> --- Victor Hadianto <vi...@nuix.com.au> wrote:
> > Hi list,
> >
> > Is there an easy way for duplicating a document in the index? Or can
> > someone
> > point me to the right direction for looking?
> >
> > Thanks,
> > --
> > Victor Hadianto
> >
> > NUIX Pty Ltd
> > Level 8, 143 York Street, Sydney 2000
> > Phone: (02) 9283 9010
> > Fax:   (02) 9283 9020
> >
> > This message is intended only for the named recipient. If you are not
> > the
> > intended recipient you are notified that disclosing, copying,
> > distributing
> > or taking any action in reliance on the contents of this message or
> > attachment is strictly prohibited.
> >


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: Duplicating a document in the index.

Posted by Otis Gospodnetic <ot...@yahoo.com>.
You could add it twice.
You could probably also get it out of the index (e.g. via search), and
re-add it.
You can have multiple instances of the same document in the index.

Otis

--- Victor Hadianto <vi...@nuix.com.au> wrote:
> Hi list,
> 
> Is there an easy way for duplicating a document in the index? Or can
> someone 
> point me to the right direction for looking?
> 
> Thanks,
> -- 
> Victor Hadianto
> 
> NUIX Pty Ltd
> Level 8, 143 York Street, Sydney 2000
> Phone: (02) 9283 9010
> Fax:   (02) 9283 9020
> 
> This message is intended only for the named recipient. If you are not
> the
> intended recipient you are notified that disclosing, copying,
> distributing
> or taking any action in reliance on the contents of this message or
> attachment is strictly prohibited.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org