Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 49062 invoked from network); 27 Nov 2007 12:54:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Nov 2007 12:54:40 -0000 Received: (qmail 66673 invoked by uid 500); 27 Nov 2007 12:54:21 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 66645 invoked by uid 500); 27 Nov 2007 12:54:21 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 66634 invoked by uid 99); 27 Nov 2007 12:54:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Nov 2007 04:54:21 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [217.12.10.85] (HELO web26011.mail.ukl.yahoo.com) (217.12.10.85) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 27 Nov 2007 12:54:01 +0000 Received: (qmail 44702 invoked by uid 60001); 27 Nov 2007 12:54:02 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=qTuAuKrd7Xg9b+eF1SMYCTDfRLpmc3/BxXui7tusA95+aCGimqIIHakFOo1O5DmLri0yA63TacvYRAGFRMcumz5uXpB60t8HWVJ42qT1OwpPPqA/6ypJrYPSp2kJQKz0jtpr/M5Fcj5p7dSriFi7sx09v4wtwkHbR2qH8txFL58=; X-YMail-OSG: bt9JJ04VM1nMWSz5dF7LLC7EKQTW7a7.vgikUBDe2t_IRseNFyBkECCb1.b69oyRHA-- Received: from [193.36.230.96] by web26011.mail.ukl.yahoo.com via HTTP; Tue, 27 Nov 2007 12:54:01 GMT X-Mailer: YahooMailRC/818.27 YahooMailWebService/0.7.157 Date: Tue, 27 Nov 2007 12:54:01 +0000 (GMT) From: mark harwood Subject: Re: Searching user-private annotations associated with indexed documents To: java-user@lucene.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <59899.43620.qm@web26011.mail.ukl.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org Do the annotations have positions ?=0A=0ADo you want to do things like phra= se-search e.g. =0A "PERSON_ANNOTATION works for Google" =0A=0AOr is you= r idea of an annotation more simply a del.ici.ous-style tag associated with= the whole document?=0A=0ACheers=0AMark=0A=0A----- Original Message ----=0A= From: lucene user =0ATo: java-user@lucene.apache.org=0ASe= nt: Tuesday, 27 November, 2007 12:31:38 PM=0ASubject: Re: Searching user-pr= ivate annotations associated with indexed documents=0A=0AI'd be VERY gratef= ul for your help, folks! Thanks! I really need some=0Ainsight on this. THAN= KS!!=0A=0AOn Nov 26, 2007 6:43 PM, lucene user wrote:=0A= > Here are the three options that seem practical to us right now.=0A>=0A> (= 1) Do The annotation search in postgres using LIKE or the=0A> postgres n= ative full text search. Take the resulting list=0A> of file ids and use = it to build a filter for the lucene query,=0A> the way we currently do f= or folders.=0A>=0A> (2) Add a second lucene index that contains only annota= tions.=0A> First retrieve a list of file ids satisfying the annotation= =0A> query from this index and use it to create a filter for the=0A> = main lucene query on the archive.=0A> Whenever annotation text is edited= ,=0A> if blank, delete annotation from index=0A> otherwise add or= replace annotation in index.=0A>=0A> (3) Add a second lucene index that co= ntains contentrefs.=0A> This index would contain the same fields as the= arhicve index=0A> plus the following:=0A> database_id: list of s= ystemuser_id and contentref_id.=0A> annotation: list of all annotati= on text for this=0A> system user and content ref.=0A> = folders: list of all folder names for this systemuser and=0A> = content ref=0A>=0A> Whenever an article is added to or re= moved from a folder,=0A> or its annotation text is edited, the followin= g would occur:=0A> See if it has an entry in the lucene index for the= database.=0A> if so,=0A> extract the lucene document from th= e index.=0A> if the updated list of folders that contain it is empt= y,=0A> delete this document from the lucene database index.=0A> = otherwise,=0A> update the folder and annotation in the do= cument object.=0A> delete this document from the index.=0A> = add the updated document object to the index.=0A> if not,=0A> = extract the lucene document for the article from the archive=0A index= =0A> add the database_id, folders, and annotation fields to this=0A= object=0A> add the document object to the lucene database index.= =0A>=0A> Got a better idea on this?=0A>=0A> Thanks!!=0A>=0A>=0A> On Nov 26,= 2007 5:33 PM, lucene user wrote:=0A> > Folks=0A> >=0A> = > I have some additional textual data that is user specific,=0A basically= =0A> > annotations about documents. I would like to be able to do=0A> > **c= ombined** searches, looking for some words in the document and=0A some=0A> = > in my users' private annotations about that document. Any=0A suggestions= =0A> > about how I should handle this? The annotations are changeable by=0A= > > users at any time so we have to be ready to delete them and add=0A othe= rs=0A> > at any time when the user does edit an annotation.=0A> >=0A> > Do = I need a second Lucene index? Can I do a query against two=0A indexes=0A> >= at the same time? If so, how?=0A> >=0A> > The annotations will be very sma= ll but highly volatile. The=0A database=0A> > of documents will grow large = but nothing will be deleted from it.=0A> >=0A> > Thanks!=0A> >=0A>=0A=0A---= ------------------------------------------------------------------=0ATo uns= ubscribe, e-mail: java-user-unsubscribe@lucene.apache.org=0AFor additional = commands, e-mail: java-user-help@lucene.apache.org=0A=0A=0A=0A=0A=0A=0A = ___________________________________________________________=0AYahoo! Answ= ers - Got a question? Someone out there knows the answer. Try it=0Anow.=0Ah= ttp://uk.answers.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org